Examples of joinColumns()


Examples of javax.persistence.CollectionTable.joinColumns()

      if ( collectionTable != null ) {
        catalog = collectionTable.catalog();
        schema = collectionTable.schema();
        tableName = collectionTable.name();
        uniqueConstraints = collectionTable.uniqueConstraints();
        joins = collectionTable.joinColumns();
        inverseJoins = null;
      }
      else {
        catalog = assocTable.catalog();
        schema = assocTable.schema();
View Full Code Here

Examples of javax.persistence.CollectionTable.joinColumns()

      if ( collectionTable != null ) {
        catalog = collectionTable.catalog();
        schema = collectionTable.schema();
        tableName = collectionTable.name();
        uniqueConstraints = collectionTable.uniqueConstraints();
        joins = collectionTable.joinColumns();
        inverseJoins = null;
      }
      else {
        catalog = assocTable.catalog();
        schema = assocTable.schema();
View Full Code Here

Examples of javax.persistence.CollectionTable.joinColumns()

        selectBuf.append(" WHERE ");

        insertBuf.append(ct.name()).append("(");
        StringBuilder valuesBuf = new StringBuilder("SELECT ");

        for (JoinColumn jc : ct.joinColumns()) {
            selectBuf.append(ct.name()).append(".").append(jc.name()).append("=");
            if (jc.referencedColumnName().length() == 0) {
                selectBuf.append(idAttr.table).append(".").append(idAttr.columnName);
                valuesBuf.append(idAttr.table).append(".").append(idAttr.columnName);
                clearBuf.append(ct.name()).append(".").append(jc.name()).append("=?");
View Full Code Here

Examples of javax.persistence.CollectionTable.joinColumns()

    assertAnnotationPresent( CollectionTable.class );
    CollectionTable tableAnno = reader.getAnnotation( CollectionTable.class );
    assertEquals( "", tableAnno.name() );
    assertEquals( "", tableAnno.catalog() );
    assertEquals( "", tableAnno.schema() );
    assertEquals( 0, tableAnno.joinColumns().length );
    assertEquals( 0, tableAnno.uniqueConstraints().length );
  }

  public void testCollectionTableAllChildren() throws Exception {
    reader = getReader( Entity3.class, "field1", "element-collection.orm27.xml" );
View Full Code Here

Examples of javax.persistence.CollectionTable.joinColumns()

    assertEquals( "table1", tableAnno.name() );
    assertEquals( "catalog1", tableAnno.catalog() );
    assertEquals( "schema1", tableAnno.schema() );

    //JoinColumns
    JoinColumn[] joinColumns = tableAnno.joinColumns();
    assertEquals( 2, joinColumns.length );
    assertEquals( "", joinColumns[0].name() );
    assertEquals( "", joinColumns[0].referencedColumnName() );
    assertEquals( "", joinColumns[0].table() );
    assertEquals( "", joinColumns[0].columnDefinition() );
View Full Code Here

Examples of javax.persistence.CollectionTable.joinColumns()

      if ( collectionTable != null ) {
        catalog = collectionTable.catalog();
        schema = collectionTable.schema();
        tableName = collectionTable.name();
        uniqueConstraints = collectionTable.uniqueConstraints();
        joins = collectionTable.joinColumns();
        inverseJoins = null;
      }
      else {
        catalog = assocTable.catalog();
        schema = assocTable.schema();
View Full Code Here

Examples of javax.persistence.CollectionTable.joinColumns()

      if (collectionTable != null) {
        catalog = collectionTable.catalog();
        schema = collectionTable.schema();
        tableName = collectionTable.name();
        uniqueConstraints = collectionTable.uniqueConstraints();
        joins = collectionTable.joinColumns();
        inverseJoins = null;
      }
      else {
        catalog = assocTable.catalog();
        schema = assocTable.schema();
View Full Code Here

Examples of javax.persistence.CollectionTable.joinColumns()

      if ( collectionTable != null ) {
        catalog = collectionTable.catalog();
        schema = collectionTable.schema();
        tableName = collectionTable.name();
        uniqueConstraints = collectionTable.uniqueConstraints();
        joins = collectionTable.joinColumns();
        inverseJoins = null;
      }
      else {
        catalog = assocTable.catalog();
        schema = assocTable.schema();
View Full Code Here

Examples of javax.persistence.JoinTable.joinColumns()

        // expected this
        readJoinTable(joinTable, prop);

      } else {
        // OneToMany in theory
        prop.getTableJoin().addJoinColumn(true, joinTable.joinColumns(), beanTable);
      }
    }

    if (prop.getMappedBy() != null){
      // the join is derived by reversing the join information
View Full Code Here

Examples of javax.persistence.JoinTable.joinColumns()

        if ( table != null ) {
          ad.setValue( "name", table.name() );
          ad.setValue( "schema", table.schema() );
          ad.setValue( "catalog", table.catalog() );
          ad.setValue( "uniqueConstraints", table.uniqueConstraints() );
          ad.setValue( "joinColumns", table.joinColumns() );
          ad.setValue( "inverseJoinColumns", table.inverseJoinColumns() );
        }
      }
      if ( StringHelper.isEmpty( (String) ad.valueOf( "schema" ) )
          && StringHelper.isNotEmpty( defaults.getSchema() ) ) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.