Package org.hibernate.ogm.grid

Examples of org.hibernate.ogm.grid.AssociationKeyMetadata


    String[] propertyColumnNames = persister.getPropertyColumnNames( propertyIndex );
    String[] rowKeyColumnNames = buildRowKeyColumnNamesForStarToOne( persister, propertyColumnNames );
    String tableName =  persister.getTableName( tableIndex );
    EntityKeyMetadata targetEntityKeyMetadata = persister.createTargetEntityKeyMetadatata( tableName, propertyColumnNames, rowKeyColumnNames );

    AssociationKeyMetadata associationKeyMetadata = new AssociationKeyMetadata(
        tableName,
        propertyColumnNames,
        rowKeyColumnNames,
        EMPTY_STRING_ARRAY,
        targetEntityKeyMetadata,
View Full Code Here


    String[] propertyColumnNames = persister.getPropertyColumnNames( propertyIndex );
    String[] rowKeyColumnNames = buildRowKeyColumnNamesForStarToOne( persister, propertyColumnNames );
    String tableName =  persister.getTableName( tableIndex );
    EntityKeyMetadata targetEntityKeyMetadata = persister.createTargetEntityKeyMetadatata( tableName, propertyColumnNames, rowKeyColumnNames );

    AssociationKeyMetadata associationKeyMetadata = new AssociationKeyMetadata(
        tableName,
        propertyColumnNames,
        rowKeyColumnNames,
        EMPTY_STRING_ARRAY,
        targetEntityKeyMetadata,
View Full Code Here

      if ( uniqueKeyType.isEntityType() ) {
        String[] propertyColumnNames = getPropertyColumnNames( index );
        String[] rowKeyColumnNames = buildRowKeyColumnNamesForStarToOne( this, propertyColumnNames );
        String tableName = getTableName();
        EntityKeyMetadata entityKeyMetadata = createTargetEntityKeyMetadatata( tableName, propertyColumnNames, rowKeyColumnNames );
        AssociationKeyMetadata metadata = new AssociationKeyMetadata(
            tableName,
            propertyColumnNames,
            rowKeyColumnNames,
            ArrayHelper.EMPTY_STRING_ARRAY,
            entityKeyMetadata,
View Full Code Here

    //we get the property type for an associated entity
    final int propertyIndex = getPropertyIndex( propertyName );
    final GridType gridUniqueKeyType = getUniqueKeyTypeFromAssociatedEntity( propertyIndex, propertyName );
    //get the associated property index (to get its column names)
    //find the ids per unique property name
    AssociationKeyMetadata associationKeyMetadata = associationKeyMetadataPerPropertyName.get( propertyName );
    if ( associationKeyMetadata == null ) {
      throw new AssertionFailure( "loadByUniqueKey on a non EntityType:" + propertyName );
    }
    AssociationPersister associationPersister = new AssociationPersister(
          getMappedClass()
View Full Code Here

    RowKeyBuilder rowKeyBuilder = initializeRowKeyBuilder();
    String[] rowKeyColumnNames = rowKeyBuilder.getColumnNames();
    String[] rowKeyIndexColumnNames = rowKeyBuilder.getIndexColumnNames();

    associationKeyMetadata = new AssociationKeyMetadata(
        getTableName(),
        getKeyColumnNames(),
        rowKeyColumnNames,
        rowKeyIndexColumnNames,
        targetEntityKeyMetadata( false ),
        getElementColumnNames()
    );

    associationKeyMetadataFromElement = new AssociationKeyMetadata(
        getTableName(),
        getElementColumnNames(),
        rowKeyColumnNames,
        rowKeyIndexColumnNames,
        targetEntityKeyMetadata( true ),
View Full Code Here

  private void initAssociationKeyMetadata() {
    for (int index = 0 ; index < getPropertySpan() ; index++) {
      final Type uniqueKeyType = getPropertyTypes()[index];
      if ( uniqueKeyType.isEntityType() ) {
        String[] propertyColumnNames = getPropertyColumnNames( index );
        AssociationKeyMetadata metadata = new AssociationKeyMetadata(
            getTableName(),
            propertyColumnNames,
            buildRowKeyColumnNamesForStarToOne( this, propertyColumnNames )
        );
        associationKeyMetadataPerPropertyName.put( getPropertyNames()[index], metadata );
View Full Code Here

    //we get the property type for an associated entity
    final int propertyIndex = getPropertyIndex( propertyName );
    final GridType gridUniqueKeyType = getUniqueKeyTypeFromAssociatedEntity( propertyIndex, propertyName );
    //get the associated property index (to get its column names)
    //find the ids per unique property name
    AssociationKeyMetadata associationKeyMetadata = associationKeyMetadataPerPropertyName.get( propertyName );
    if ( associationKeyMetadata == null ) {
      throw new AssertionFailure( "loadByUniqueKey on a non EntityType:" + propertyName );
    }
    AssociationPersister associationPersister = new AssociationPersister(
          getMappedClass()
View Full Code Here

    }
    else {
      gridTypeOfAssociatedId = null;
      associationType = AssociationType.OTHER;
    }
    associationKeyMetadata = new AssociationKeyMetadata(
        getTableName(),
        getKeyColumnNames(),
        getRowKeyColumnNames()
    );

    associationKeyMetadataFromElement = new AssociationKeyMetadata(
        getTableName(),
        getElementColumnNames(),
        getRowKeyColumnNames()
    );
View Full Code Here

  private void doAddPropertyMetadata(int tableIndex, int propertyIndex, Object[] newColumnValue) {

    String[] propertyColumnNames = persister.getPropertyColumnNames( propertyIndex );
    String[] rowKeyColumnNames = buildRowKeyColumnNamesForStarToOne( persister, propertyColumnNames );

    AssociationKeyMetadata associationKeyMetadata = new AssociationKeyMetadata(
        persister.getTableName( tableIndex ),
        propertyColumnNames,
        rowKeyColumnNames
    );
View Full Code Here

                    int propertyIndex,
                    Object[] oldColumnValue) {
    String[] propertyColumnNames = persister.getPropertyColumnNames( propertyIndex );
    String[] rowKeyColumnNames = buildRowKeyColumnNamesForStarToOne( persister, propertyColumnNames );

    AssociationKeyMetadata associationKeyMetadata = new AssociationKeyMetadata(
        persister.getTableName( tableIndex ),
        propertyColumnNames,
        rowKeyColumnNames
    );
View Full Code Here

TOP

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

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.