Examples of AnnotationDescriptor


Examples of org.hibernate.annotations.common.annotationfactory.AnnotationDescriptor

  }

  private Transient getTransient(XMLContext.Default defaults) {
    for ( Element element : elementsForProperty ) {
      if ( "transient".equals( element.getName() ) ) {
        AnnotationDescriptor ad = new AnnotationDescriptor( Transient.class );
        return AnnotationFactory.create( ad );
      }
    }
    if ( elementsForProperty.size() == 0 && defaults.canUseJavaAnnotations() ) {
      return getJavaAnnotation( Transient.class );
View Full Code Here

Examples of org.hibernate.annotations.common.annotationfactory.AnnotationDescriptor

    for ( Element element : elementsForProperty ) {
      if ( "version".equals( element.getName() ) ) {
        Annotation annotation = buildColumns( element );
        addIfNotNull( annotationList, annotation );
        getTemporal( annotationList, element );
        AnnotationDescriptor basic = new AnnotationDescriptor( Version.class );
        annotationList.add( AnnotationFactory.create( basic ) );
        getAccessType( annotationList, element );
      }
    }
    if ( elementsForProperty.size() == 0 && defaults.canUseJavaAnnotations() ) {
View Full Code Here

Examples of org.hibernate.annotations.common.annotationfactory.AnnotationDescriptor

        addIfNotNull( annotationList, annotation );
        getAccessType( annotationList, element );
        getTemporal( annotationList, element );
        getLob( annotationList, element );
        getEnumerated( annotationList, element );
        AnnotationDescriptor basic = new AnnotationDescriptor( Basic.class );
        getFetchType( basic, element );
        copyBooleanAttribute( basic, element, "optional" );
        annotationList.add( AnnotationFactory.create( basic ) );
      }
    }
View Full Code Here

Examples of org.hibernate.annotations.common.annotationfactory.AnnotationDescriptor

  }

  private void getEnumerated(List<Annotation> annotationList, Element element) {
    Element subElement = element != null ? element.element( "enumerated" ) : null;
    if ( subElement != null ) {
      AnnotationDescriptor ad = new AnnotationDescriptor( Enumerated.class );
      String enumerated = subElement.getTextTrim();
      if ( "ORDINAL".equalsIgnoreCase( enumerated ) ) {
        ad.setValue( "value", EnumType.ORDINAL );
      }
      else if ( "STRING".equalsIgnoreCase( enumerated ) ) {
        ad.setValue( "value", EnumType.STRING );
      }
      else if ( StringHelper.isNotEmpty( enumerated ) ) {
        throw new AnnotationException( "Unknown EnumType: " + enumerated + ". " + SCHEMA_VALIDATION );
      }
      annotationList.add( AnnotationFactory.create( ad ) );
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.