Examples of AttributeOverride


Examples of javax.persistence.AttributeOverride

   * In some contexts (such as an association mapping) merging with
   * annotations is never allowed.
   */
  private AttributeOverrides mergeAttributeOverrides(XMLContext.Default defaults, List<AttributeOverride> attributes, boolean mergeWithAnnotations) {
    if ( mergeWithAnnotations && defaults.canUseJavaAnnotations() ) {
      AttributeOverride annotation = getJavaAnnotation( AttributeOverride.class );
      addAttributeOverrideIfNeeded( annotation, attributes );
      AttributeOverrides annotations = getJavaAnnotation( AttributeOverrides.class );
      if ( annotations != null ) {
        for ( AttributeOverride current : annotations.value() ) {
          addAttributeOverrideIfNeeded( current, attributes );
View Full Code Here

Examples of javax.persistence.AttributeOverride

  }

  private AttributeOverrides mergeAttributeOverrides(XMLContext.Default defaults,
                             List<AttributeOverride> attributes) {
    if ( defaults.canUseJavaAnnotations() ) {
      AttributeOverride annotation = getJavaAnnotation( AttributeOverride.class );
      addAttributeOverrideIfNeeded( annotation, attributes );
      AttributeOverrides annotations = getJavaAnnotation( AttributeOverrides.class );
      if ( annotations != null ) {
        for (AttributeOverride current : annotations.value()) {
          addAttributeOverrideIfNeeded( current, attributes );
View Full Code Here

Examples of javax.persistence.AttributeOverride

   * In some contexts (such as an association mapping) merging with
   * annotations is never allowed.
   */
  private AttributeOverrides mergeAttributeOverrides(XMLContext.Default defaults, List<AttributeOverride> attributes, boolean mergeWithAnnotations) {
    if ( mergeWithAnnotations && defaults.canUseJavaAnnotations() ) {
      AttributeOverride annotation = getJavaAnnotation( AttributeOverride.class );
      addAttributeOverrideIfNeeded( annotation, attributes );
      AttributeOverrides annotations = getJavaAnnotation( AttributeOverrides.class );
      if ( annotations != null ) {
        for ( AttributeOverride current : annotations.value() ) {
          addAttributeOverrideIfNeeded( current, attributes );
View Full Code Here

Examples of javax.persistence.AttributeOverride

  }

  private static Map<String, Column[]> buildColumnOverride(XAnnotatedElement element, String path) {
    Map<String, Column[]> columnOverride = new HashMap<String, Column[]>();
    if ( element == null ) return columnOverride;
    AttributeOverride singleOverride = element.getAnnotation( AttributeOverride.class );
    AttributeOverrides multipleOverrides = element.getAnnotation( AttributeOverrides.class );
    AttributeOverride[] overrides;
    if ( singleOverride != null ) {
      overrides = new AttributeOverride[] { singleOverride };
    }
View Full Code Here

Examples of javax.persistence.AttributeOverride

  }

  private static Map<String, Column[]> buildColumnOverride(XAnnotatedElement element, String path) {
    Map<String, Column[]> columnOverride = new HashMap<String, Column[]>();
    if ( element == null ) return columnOverride;
    AttributeOverride singleOverride = element.getAnnotation( AttributeOverride.class );
    AttributeOverrides multipleOverrides = element.getAnnotation( AttributeOverrides.class );
    AttributeOverride[] overrides;
    if ( singleOverride != null ) {
      overrides = new AttributeOverride[] { singleOverride };
    }
View Full Code Here

Examples of javax.persistence.AttributeOverride

        void onEntity(
                JpaEntity entity,
                AnnotatedElement element,
                AnnotationProcessorStack context) {

            AttributeOverride annotation = element.getAnnotation(AttributeOverride.class);
            entity.getAttributeOverrides().add(new JpaAttributeOverride(annotation));
        }
View Full Code Here

Examples of javax.persistence.AttributeOverride

  }

  private static Map<String, Column[]> buildColumnOverride(XAnnotatedElement element, String path) {
    Map<String, Column[]> columnOverride = new HashMap<String, Column[]>();
    if ( element == null ) return columnOverride;
    AttributeOverride singleOverride = element.getAnnotation( AttributeOverride.class );
    AttributeOverrides multipleOverrides = element.getAnnotation( AttributeOverrides.class );
    AttributeOverride[] overrides;
    if ( singleOverride != null ) {
      overrides = new AttributeOverride[] { singleOverride };
    }
View Full Code Here

Examples of javax.persistence.AttributeOverride

        if (aos != null) {
            overrides = aos.value();
        }
       
        if (overrides == null || overrides.length == 0) {
            AttributeOverride override = ae.getAnnotation(AttributeOverride.class);
            if (override != null) {
                overrides = new AttributeOverride[1];
                overrides[0] = override;
            } else {
                overrides = new AttributeOverride[0];
View Full Code Here

Examples of javax.persistence.AttributeOverride

        void onEntity(
                JpaEntity entity,
                AnnotatedElement element,
                AnnotationProcessorStack context) {

            AttributeOverride annotation = element.getAnnotation(AttributeOverride.class);
            entity.getAttributeOverrides().add(new JpaAttributeOverride(annotation));
        }
View Full Code Here

Examples of javax.persistence.AttributeOverride

      logger.log(BasicLevel.ERROR, sc.getSourceDescShort()
          + ": an identifier must be defined for this Entity class.");
    }

    // Parse attributes overriding
    AttributeOverride ao = (AttributeOverride) c.getAnnotation(AttributeOverride.class);
    AttributeOverrides aos = (AttributeOverrides) c.getAnnotation(AttributeOverrides.class);
    parseAttributeOverriding(ao, aos, sc);
    for (Method m : c.getMethods()) {
      ao = (AttributeOverride) m.getAnnotation(AttributeOverride.class);
      aos = (AttributeOverrides) m  .getAnnotation(AttributeOverrides.class);
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.