Package org.hibernate.ogm.grid

Examples of org.hibernate.ogm.grid.RowKey


    while ( entries.hasNext() ) {
      Object entry = entries.next();
      if ( collection.needsUpdating( entry, i, elementType ) ) {
        //find the matching element
        RowKey assocEntryKey = getTupleKeyForUpdate( key, collection, session, i, entry );
        Tuple assocEntryTuple = metadataProvider.getCollectionMetadata().get( assocEntryKey );
        if ( assocEntryTuple == null ) {
          throw new AssertionFailure( "Updating a collection tuple that is not present: " +
              "table {" + getTableName() + "} collectionKey {" + key + "} entry {" + entry + "}" );
        }
View Full Code Here


      if ( deletes.hasNext() ) {
        int count = 0;
        while ( deletes.hasNext() ) {
          Object entry = deletes.next();
          //find the matching element
          RowKey assocEntryKey = getTupleKeyForDelete(
              id, collection, session, entry, deleteByIndex
          );
          Tuple assocEntryTuple = metadataProvider.getCollectionMetadata().get( assocEntryKey );
          if ( assocEntryTuple == null ) {
            throw new AssertionFailure( "Deleting a collection tuple that is not present: " +
View Full Code Here

    else {
      for (int index = 0 ; index < length ; index++ ) {
        columnValuesArray[index] = tuple.get( columnNamesArray[index] );
      }
    }
    return new RowKey( tableName, columnNamesArray, columnValuesArray );
  }
View Full Code Here

  public CouchDBAssociationSnapshot(CouchDBAssociation association, AssociationKey key) {
    this.couchDbAssociation = association;
    this.key = key;

    for ( Map<String, Object> row : association.getRows() ) {
      RowKey rowKey = new RowKeyBuilder()
          .tableName( key.getTable() )
          .addColumns( key.getRowKeyColumnNames() )
          .values( getRowKeyColumnValues( row, key ) )
          .build();
View Full Code Here

  private final Map<RowKey, Tuple> tuples = new HashMap<RowKey, Tuple>();

  public Neo4jAssociationSnapshot(Node ownerNode, AssociationKey associationKey) {
    for ( Relationship relationship : relationships( ownerNode, associationKey ) ) {
      Neo4jTupleAssociationSnapshot snapshot = new Neo4jTupleAssociationSnapshot( relationship, associationKey);
      RowKey rowKey = convert( associationKey, snapshot );
      tuples.put( rowKey, new Tuple( snapshot ) );
    }
  }
View Full Code Here

    for ( int i = 0; i < columnNames.length; i++ ) {
      values[i] = snapshot.get( columnNames[i] );
    }

    return new RowKey( associationKey.getTable(), columnNames, values, null );
  }
View Full Code Here

  public IntegralDataTypeHolder doWorkInCurrentTransactionIfAny(SessionImplementor session) {
    defineGridTypes( session );
    final Object segmentColumnValue = nullSafeSet(
        segmentGridType, segmentValue, segmentColumnName, session
    );
    RowKey key = new RowKey(
        tableName,
        new String[] { segmentColumnName },
        new Object[] { segmentColumnValue }
    );
View Full Code Here

    while ( entries.hasNext() ) {
      Object entry = entries.next();
      if ( collection.needsUpdating( entry, i, elementType ) ) {
        // find the matching element
        RowKey assocEntryKey = getTupleKeyForUpdate( key, collection, session, i, entry );
        Tuple assocEntryTuple = associationPersister.getAssociation().get( assocEntryKey );
        if ( assocEntryTuple == null ) {
          throw new AssertionFailure( "Updating a collection tuple that is not present: " + "table {" + getTableName() + "} collectionKey {" + key + "} entry {" + entry + "}" );
        }
        // update the matching element
View Full Code Here

      if ( deletes.hasNext() ) {
        int count = 0;
        while ( deletes.hasNext() ) {
          Object entry = deletes.next();
          // find the matching element
          RowKey assocEntryKey = getTupleKeyForDelete( id, collection, session, entry, deleteByIndex );
          Tuple assocEntryTuple = associationPersister.getAssociation().get( assocEntryKey );
          if ( assocEntryTuple == null ) {
            throw new AssertionFailure( "Deleting a collection tuple that is not present: " + "table {" + getTableName() + "} collectionKey {" + id + "} entry {" + entry + "}" );
          }
          // delete the tuple
View Full Code Here

              propertyColumnNames,
              includeColumns[propertyIndex],
              session
          );
    Object[] columnValues = LogicalPhysicalConverterHelper.getColumnValuesFromResultset( tuple, rowKeyColumnNames );
    final RowKey rowKey = new RowKey( persister.getTableName(), rowKeyColumnNames, columnValues );

    Tuple assocEntryTuple = associationPersister.createAndPutAssociationTuple( rowKey );
    for ( String column : tuple.getColumnNames() ) {
      assocEntryTuple.put( column, tuple.get( column ) );
    }
View Full Code Here

TOP

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

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.