Package org.hibernate.annotationfactory

Examples of org.hibernate.annotationfactory.AnnotationDescriptor.valueOf()


        }
        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() );
        }
        return AnnotationFactory.create( annotation );
      }
View Full Code Here


      //ignore java annotation, an element is defined
      AnnotationDescriptor annotation = new AnnotationDescriptor( Table.class );
      copyStringAttribute( annotation, subelement, "name", false );
      copyStringAttribute( annotation, subelement, "catalog", false );
      if ( StringHelper.isNotEmpty( defaults.getCatalog() )
          && StringHelper.isEmpty( (String) annotation.valueOf( "catalog" ) ) ) {
        annotation.setValue( "catalog", defaults.getCatalog() );
      }
      copyStringAttribute( annotation, subelement, "schema", false );
      if ( StringHelper.isNotEmpty( defaults.getSchema() )
          && StringHelper.isEmpty( (String) annotation.valueOf( "schema" ) ) ) {
View Full Code Here

          && StringHelper.isEmpty( (String) annotation.valueOf( "catalog" ) ) ) {
        annotation.setValue( "catalog", defaults.getCatalog() );
      }
      copyStringAttribute( annotation, subelement, "schema", false );
      if ( StringHelper.isNotEmpty( defaults.getSchema() )
          && StringHelper.isEmpty( (String) annotation.valueOf( "schema" ) ) ) {
        annotation.setValue( "schema", defaults.getSchema() );
      }
      buildUniqueConstraints( annotation, subelement );
      return AnnotationFactory.create( annotation );
    }
View Full Code Here

    for ( Element element : elements ) {
      AnnotationDescriptor annotation = new AnnotationDescriptor( SecondaryTable.class );
      copyStringAttribute( annotation, element, "name", false );
      copyStringAttribute( annotation, element, "catalog", false );
      if ( StringHelper.isNotEmpty( defaults.getCatalog() )
          && StringHelper.isEmpty( (String) annotation.valueOf( "catalog" ) ) ) {
        annotation.setValue( "catalog", defaults.getCatalog() );
      }
      copyStringAttribute( annotation, element, "schema", false );
      if ( StringHelper.isNotEmpty( defaults.getSchema() )
          && StringHelper.isEmpty( (String) annotation.valueOf( "schema" ) ) ) {
View Full Code Here

          && StringHelper.isEmpty( (String) annotation.valueOf( "catalog" ) ) ) {
        annotation.setValue( "catalog", defaults.getCatalog() );
      }
      copyStringAttribute( annotation, element, "schema", false );
      if ( StringHelper.isNotEmpty( defaults.getSchema() )
          && StringHelper.isEmpty( (String) annotation.valueOf( "schema" ) ) ) {
        annotation.setValue( "schema", defaults.getSchema() );
      }
      buildUniqueConstraints( annotation, element );
      annotation.setValue( "pkJoinColumns", buildPrimaryKeyJoinColumns( element ) );
      secondaryTables.add( (SecondaryTable) AnnotationFactory.create( annotation ) );
View Full Code Here

        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() ) ) {
View Full Code Here

        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 ) );
      }
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.