Package javax.persistence

Examples of javax.persistence.Converts


        attributeConversionInfoMap.put( property.getName(), info );
      }
    }
    {
      // @Converts annotation on the Embeddable attribute
      final Converts convertsAnnotation = property.getAnnotation( Converts.class );
      if ( convertsAnnotation != null ) {
        for ( Convert convertAnnotation : convertsAnnotation.value() ) {
          final AttributeConversionInfo info = new AttributeConversionInfo( convertAnnotation, property );
          attributeConversionInfoMap.put( property.getName(), info );
        }
      }
    }
View Full Code Here


      final String qualifiedAttributeName = qualifyConverterAttributeName( attributeNamePrefix, physicalAnnotation.attributeName() );
      if ( ! convertAnnotationsMap.containsKey( qualifiedAttributeName ) ) {
        convertAnnotationsMap.put( qualifiedAttributeName, physicalAnnotation );
      }
    }
    final Converts physicalGroupingAnnotation = getPhysicalAnnotation( Converts.class );
    if ( physicalGroupingAnnotation != null ) {
      for ( Convert convertAnnotation : physicalGroupingAnnotation.value() ) {
        // again, only add if no XML element named a converter for this attribute
        final String qualifiedAttributeName = qualifyConverterAttributeName( attributeNamePrefix, convertAnnotation.attributeName() );
        if ( ! convertAnnotationsMap.containsKey( qualifiedAttributeName ) ) {
          convertAnnotationsMap.put( qualifiedAttributeName, convertAnnotation );
        }
View Full Code Here

        applyLocalConvert( convertAnnotation, collectionProperty, elementAttributeConversionInfoMap, keyAttributeConversionInfoMap );
      }
    }

    {
      final Converts convertsAnnotation = collectionProperty.getAnnotation( Converts.class );
      if ( convertsAnnotation != null ) {
        for ( Convert convertAnnotation : convertsAnnotation.value() ) {
          applyLocalConvert(
              convertAnnotation,
              collectionProperty,
              elementAttributeConversionInfoMap,
              keyAttributeConversionInfoMap
View Full Code Here

        }
        infoMap.put( info.getAttributeName(), info );
      }
    }
    {
      final Converts convertsAnnotation = xClass.getAnnotation( Converts.class );
      if ( convertsAnnotation != null ) {
        for ( Convert convertAnnotation : convertsAnnotation.value() ) {
          final AttributeConversionInfo info = new AttributeConversionInfo( convertAnnotation, xClass );
          if ( StringHelper.isEmpty( info.getAttributeName() ) ) {
            throw new IllegalStateException( "@Converts placed on @Entity/@MappedSuperclass must define attributeName" );
          }
          infoMap.put( info.getAttributeName(), info );
View Full Code Here

        }
      }
    }
    {
      // @Converts annotation on the Embeddable attribute
      final Converts convertsAnnotation = property.getAnnotation( Converts.class );
      if ( convertsAnnotation != null ) {
        for ( Convert convertAnnotation : convertsAnnotation.value() ) {
          final AttributeConversionInfo info = new AttributeConversionInfo( convertAnnotation, property );
          if ( StringHelper.isEmpty( info.getAttributeName() ) ) {
            attributeConversionInfoMap.put( propertyName, info );
          }
          else {
View Full Code Here

        infoMap.put( info.getAttributeName(), info );
      }
    }
    {
      // @Converts annotation on the Embeddable class level
      final Converts convertsAnnotation = embeddableXClass.getAnnotation( Converts.class );
      if ( convertsAnnotation != null ) {
        for ( Convert convertAnnotation : convertsAnnotation.value() ) {
          final AttributeConversionInfo info = new AttributeConversionInfo( convertAnnotation, embeddableXClass );
          if ( StringHelper.isEmpty( info.getAttributeName() ) ) {
            throw new IllegalStateException( "@Converts placed on @Embeddable must define attributeName" );
          }
          infoMap.put( info.getAttributeName(), info );
        }
      }
    }

    // then we can overlay any conversions from the Embedded attribute
    {
      // @Convert annotation on the Embedded attribute
      final Convert convertAnnotation = embeddedXProperty.getAnnotation( Convert.class );
      if ( convertAnnotation != null ) {
        final AttributeConversionInfo info = new AttributeConversionInfo( convertAnnotation, embeddableXClass );
        if ( StringHelper.isEmpty( info.getAttributeName() ) ) {
          throw new IllegalStateException( "Convert placed on Embedded attribute must define (sub)attributeName" );
        }
        infoMap.put( info.getAttributeName(), info );
      }
    }
    {
      // @Converts annotation on the Embedded attribute
      final Converts convertsAnnotation = embeddedXProperty.getAnnotation( Converts.class );
      if ( convertsAnnotation != null ) {
        for ( Convert convertAnnotation : convertsAnnotation.value() ) {
          final AttributeConversionInfo info = new AttributeConversionInfo( convertAnnotation, embeddableXClass );
          if ( StringHelper.isEmpty( info.getAttributeName() ) ) {
            throw new IllegalStateException( "Convert placed on Embedded attribute must define (sub)attributeName" );
          }
          infoMap.put( info.getAttributeName(), info );
View Full Code Here

        attributeConversionInfoMap.put( property.getName(), info );
      }
    }
    {
      // @Converts annotation on the Embeddable attribute
      final Converts convertsAnnotation = property.getAnnotation( Converts.class );
      if ( convertsAnnotation != null ) {
        for ( Convert convertAnnotation : convertsAnnotation.value() ) {
          final AttributeConversionInfo info = new AttributeConversionInfo( convertAnnotation, property );
          attributeConversionInfoMap.put( property.getName(), info );
        }
      }
    }
View Full Code Here

        }
        infoMap.put( info.getAttributeName(), info );
      }
    }
    {
      final Converts convertsAnnotation = xClass.getAnnotation( Converts.class );
      if ( convertsAnnotation != null ) {
        for ( Convert convertAnnotation : convertsAnnotation.value() ) {
          final AttributeConversionInfo info = new AttributeConversionInfo( convertAnnotation, xClass );
          if ( StringHelper.isEmpty( info.getAttributeName() ) ) {
            throw new IllegalStateException( "@Converts placed on @Entity/@MappedSuperclass must define attributeName" );
          }
          infoMap.put( info.getAttributeName(), info );
View Full Code Here

        }
      }
    }
    {
      // @Converts annotation on the Embeddable attribute
      final Converts convertsAnnotation = property.getAnnotation( Converts.class );
      if ( convertsAnnotation != null ) {
        for ( Convert convertAnnotation : convertsAnnotation.value() ) {
          final AttributeConversionInfo info = new AttributeConversionInfo( convertAnnotation, property );
          if ( StringHelper.isEmpty( info.getAttributeName() ) ) {
            attributeConversionInfoMap.put( propertyName, info );
          }
          else {
View Full Code Here

        applyLocalConvert( convertAnnotation, collectionProperty, elementAttributeConversionInfoMap, keyAttributeConversionInfoMap );
      }
    }

    {
      final Converts convertsAnnotation = collectionProperty.getAnnotation( Converts.class );
      if ( convertsAnnotation != null ) {
        for ( Convert convertAnnotation : convertsAnnotation.value() ) {
          applyLocalConvert(
              convertAnnotation,
              collectionProperty,
              elementAttributeConversionInfoMap,
              keyAttributeConversionInfoMap
View Full Code Here

TOP

Related Classes of javax.persistence.Converts

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.