Package org.hibernate.annotationfactory

Examples of org.hibernate.annotationfactory.AnnotationDescriptor


  ) {
    if ( secTableAnn != null ) {
      //handle default values
      if ( StringHelper.isNotEmpty( defaults.getCatalog() )
          || StringHelper.isNotEmpty( defaults.getSchema() ) ) {
        AnnotationDescriptor annotation = new AnnotationDescriptor( SecondaryTable.class );
        annotation.setValue( "name", secTableAnn.name() );
        annotation.setValue( "schema", secTableAnn.schema() );
        annotation.setValue( "catalog", secTableAnn.catalog() );
        annotation.setValue( "uniqueConstraints", secTableAnn.uniqueConstraints() );
        annotation.setValue( "pkJoinColumns", secTableAnn.pkJoinColumns() );
        if ( StringHelper.isEmpty( (String) annotation.valueOf( "schema" ) )
            && StringHelper.isNotEmpty( defaults.getSchema() ) ) {
          annotation.setValue( "schema", defaults.getSchema() );
        }
        if ( StringHelper.isEmpty( (String) annotation.valueOf( "catalog" ) )
            && StringHelper.isNotEmpty( defaults.getCatalog() ) ) {
          annotation.setValue( "catalog", defaults.getCatalog() );
        }
        secondaryTables.add( (SecondaryTable) AnnotationFactory.create( annotation ) );
      }
      else {
        secondaryTables.add( secTableAnn );
View Full Code Here


      Iterator it = columnNamesElements.listIterator();
      while ( it.hasNext() ) {
        Element columnNameElt = (Element) it.next();
        columnNames[columnNameIndex++] = columnNameElt.getTextTrim();
      }
      AnnotationDescriptor ucAnn = new AnnotationDescriptor( UniqueConstraint.class );
      ucAnn.setValue( "columnNames", columnNames );
      uniqueConstraints[ucIndex++] = AnnotationFactory.create( ucAnn );
    }
    annotation.setValue( "uniqueConstraints", uniqueConstraints );
  }
View Full Code Here

    PrimaryKeyJoinColumn[] pkJoinColumns = new PrimaryKeyJoinColumn[ pkJoinColumnElementList.size() ];
    int index = 0;
    Iterator pkIt = pkJoinColumnElementList.listIterator();
    while ( pkIt.hasNext() ) {
      Element subelement = (Element) pkIt.next();
      AnnotationDescriptor pkAnn = new AnnotationDescriptor( PrimaryKeyJoinColumn.class );
      copyStringAttribute( pkAnn, subelement, "name", false );
      copyStringAttribute( pkAnn, subelement, "referenced-column-name", false );
      copyStringAttribute( pkAnn, subelement, "column-definition", false );
      pkJoinColumns[index++] = AnnotationFactory.create( pkAnn );
    }
View Full Code Here

TOP

Related Classes of org.hibernate.annotationfactory.AnnotationDescriptor

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.