Package org.hibernate.ogm.model.key.spi

Examples of org.hibernate.ogm.model.key.spi.RowKey


    for ( int i = 0; i < inverseRowKeyColumnNames.length; i++ ) {
      columnValues[i] = associationRow.get( inverseRowKeyColumnNames[i] );
    }

    return new RowKey( inverseRowKeyColumnNames, columnValues );
  }
View Full Code Here


    input.readInt();

    String[] columnNames = (String[]) input.readObject();
    Object[] values = (Object[]) input.readObject();

    return new RowKey( columnNames, values );
  }
View Full Code Here

    for (int index = 0 ; index < length ; index++ ) {
      columnValuesArray[index] = tuple.get( columnNamesArray[index] );
    }

    return new RowKey( columnNamesArray, columnValuesArray );
  }
View Full Code Here

    StringBuilder sb = new StringBuilder( "Association[");

    Iterator<RowKey> rowKeys = association.getKeys().iterator();

    while ( rowKeys.hasNext() ) {
      RowKey rowKey = rowKeys.next();
      sb.append( toShortString( rowKey ) ).append( "=" ).append( toShortString( association.get( rowKey ) ) );

      if ( rowKeys.hasNext() ) {
        sb.append( ",\n" );
      }
View Full Code Here

    StringBuilder sb = new StringBuilder( "Association[\n");

    Iterator<RowKey> rowKeys = getKeys().iterator();

    while ( rowKeys.hasNext() ) {
      RowKey rowKey = rowKeys.next();
      sb.append( "  " ).append( rowKey ).append( "=" ).append( get( rowKey ) );

      if ( rowKeys.hasNext() ) {
        sb.append( ",\n" );
      }
View Full Code Here

  }

  private void addNavigationalInformationForInverseSide(int propertyIndex, AssociationKeyMetadata associationKeyMetadata, Object[] newColumnValue) {
    AssociationPersister associationPersister = createAssociationPersister( propertyIndex, associationKeyMetadata, newColumnValue );

    RowKey rowKey = getInverseRowKey( associationKeyMetadata, newColumnValue );

    Tuple associationRow = new Tuple();
    for ( String column : rowKey.getColumnNames() ) {
      associationRow.put( column, rowKey.getColumnValue( column ) );
    }
    associationPersister.getAssociation().put( rowKey, associationRow );

    associationPersister.flushToDatastore();
  }
View Full Code Here

    AssociationPersister associationPersister = createAssociationPersister( propertyIndex, associationKeyMetadata, oldColumnValue );

    Association association = associationPersister.getAssociationOrNull();

    if ( association != null ) {
      RowKey rowKey = getInverseRowKey( associationKeyMetadata, oldColumnValue );
      association.remove( rowKey );
      associationPersister.flushToDatastore();
    }
  }
View Full Code Here

    for ( int i = 0; i < columnNames.length; i++ ) {
      String columnName = columnNames[i];
      columnValues[i] = associationKey.getMetadata().isKeyColumn( columnName ) ? associationKey.getColumnValue( columnName ) : accessor.get( row, columnName );
    }

    return new RowKey( columnNames, columnValues );
  }
View Full Code Here

  }

  private void addNavigationalInformationForInverseSide(int propertyIndex, AssociationKeyMetadata associationKeyMetadata, Object[] newColumnValue) {
    AssociationPersister associationPersister = createAssociationPersister( propertyIndex, associationKeyMetadata, newColumnValue );

    RowKey rowKey = getInverseRowKey( associationKeyMetadata, newColumnValue );

    Tuple associationRow = new Tuple();
    for ( String column : rowKey.getColumnNames() ) {
      associationRow.put( column, rowKey.getColumnValue( column ) );
    }
    associationPersister.getAssociation().put( rowKey, associationRow );

    associationPersister.flushToDatastore();
  }
View Full Code Here

    AssociationPersister associationPersister = createAssociationPersister( propertyIndex, associationKeyMetadata, oldColumnValue );

    Association association = associationPersister.getAssociation();

    if ( association != null ) {
      RowKey rowKey = getInverseRowKey( associationKeyMetadata, oldColumnValue );
      association.remove( rowKey );
      associationPersister.flushToDatastore();
    }
  }
View Full Code Here

TOP

Related Classes of org.hibernate.ogm.model.key.spi.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.