Package org.hibernate.metamodel.relational

Examples of org.hibernate.metamodel.relational.UniqueKey


        String constraintName = constraintSource.name();
        if ( constraintName == null ) {
          // create a default name
        }

        UniqueKey uniqueKey = table.getOrCreateUniqueKey( constraintName );
        for ( String columnName : constraintSource.columnNames() ) {
          uniqueKey.addColumn( table.locateOrCreateColumn( quoteIdentifier( columnName ) ) );
        }
      }
    }
  }
View Full Code Here


      return;
    }
    AnnotationInstance[] uniqueConstraints = value.asNestedArray();
    for ( AnnotationInstance unique : uniqueConstraints ) {
      String name = unique.value( "name" ).asString();
      UniqueKey uniqueKey = table.getOrCreateUniqueKey( name );
      String[] columnNames = unique.value( "columnNames" ).asStringArray();
      if ( columnNames.length == 0 ) {
        //todo throw exception?
      }
      for ( String columnName : columnNames ) {
        uniqueKey.addColumn( table.getOrCreateColumn( columnName ) );
      }
    }
  }
View Full Code Here

      return;
    }
    AnnotationInstance[] uniqueConstraints = value.asNestedArray();
    for ( AnnotationInstance unique : uniqueConstraints ) {
      String name = unique.value( "name" ).asString();
      UniqueKey uniqueKey = table.getOrCreateUniqueKey( name );
      String[] columnNames = unique.value( "columnNames" ).asStringArray();
      if ( columnNames.length == 0 ) {
        //todo throw exception?
      }
      for ( String columnName : columnNames ) {
        uniqueKey.addColumn( table.getOrCreateColumn( columnName ) );
      }
    }
  }
View Full Code Here

        String constraintName = constraintSource.name();
        if ( constraintName == null ) {
          // create a default name
        }

        UniqueKey uniqueKey = table.getOrCreateUniqueKey( constraintName );
        for ( String columnName : constraintSource.columnNames() ) {
          uniqueKey.addColumn( table.locateOrCreateColumn( quoteIdentifier( columnName ) ) );
        }
      }
    }
  }
View Full Code Here

        String constraintName = constraintSource.name();
        if ( constraintName == null ) {
          // create a default name
        }

        UniqueKey uniqueKey = table.getOrCreateUniqueKey( constraintName );
        for ( String columnName : constraintSource.columnNames() ) {
          uniqueKey.addColumn( table.locateOrCreateColumn( columnName ) );
        }
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.hibernate.metamodel.relational.UniqueKey

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.