Package org.eclipse.persistence.internal.jpa.metadata.converters

Examples of org.eclipse.persistence.internal.jpa.metadata.converters.ConvertMetadata


* @since EclipseLink 2.5.1
*/
public class ConvertImpl extends MetadataImpl<ConvertMetadata> implements Convert {

    public ConvertImpl() {
        super(new ConvertMetadata());
    }
View Full Code Here


       
        // Set the converts if some are present.
        // Process all the converts first.
        if (isAnnotationPresent(JPA_CONVERTS)) {
            for (Object convert : getAnnotation(JPA_CONVERTS).getAttributeArray("value")) {
                addConvertMetadata(new ConvertMetadata((MetadataAnnotation) convert, this));
            }
        }
       
        // Process the single convert second.
        if (isAnnotationPresent(JPA_CONVERT)) {
            addConvertMetadata(new ConvertMetadata(getAnnotation(JPA_CONVERT), this));
        }
    }
View Full Code Here

    /**
     * This covers the EclipseLink Convert, single TEXT convert element.
     */
    public ElementCollection setMapKeyConvert(String mapKeyConvert) {
        ConvertMetadata convert = new ConvertMetadata();
        convert.setText(mapKeyConvert);
        getMetadata().getMapKeyConverts().add(convert);
        return this;
    }
View Full Code Here

   
    /**
     * This covers the EclipseLink Convert, single TEXT convert element.
     */
    public R setConvert(String name) {
        ConvertMetadata convert = new ConvertMetadata();
        convert.setText(name);
        getMetadata().getConverts().add(convert);
        return (R) this;
    }
View Full Code Here

   
    /**
     * This covers the EclipseLink Convert, single TEXT convert element.
     */
    public R setMapKeyConvert(String mapKeyConvert) {
        ConvertMetadata convert = new ConvertMetadata();
        convert.setText(mapKeyConvert);
        getMetadata().getMapKeyConverts().add(convert);
        return (R) this;
    }
View Full Code Here

       
        // Set the converts if some are present.
        // Process all the converts first.
        if (isAnnotationPresent(JPA_CONVERTS)) {
            for (Object convert : getAnnotation(JPA_CONVERTS).getAttributeArray("value")) {
                addConvertMetadata(new ConvertMetadata((MetadataAnnotation) convert, this));
            }
        }
       
        // Process the single convert second.
        if (isAnnotationPresent(JPA_CONVERT)) {
            addConvertMetadata(new ConvertMetadata(getAnnotation(JPA_CONVERT), this));
        }
    }
View Full Code Here

    public void processConverts() {
        if (m_converts.isEmpty()) {
            // Look for a Converts annotation.
            if (isAnnotationPresent(JPA_CONVERTS)) {
                for (Object convert : (Object[]) getAnnotation(JPA_CONVERTS).getAttributeArray("value")) {
                    processConvert(new ConvertMetadata((MetadataAnnotation) convert, this));
                }
            } else {
                // Look for a Convert annotation
                if (isAnnotationPresent(JPA_CONVERT)) {   
                    processConvert(new ConvertMetadata(getAnnotation(JPA_CONVERT), this));
                }
            }
        } else {
            if (isAnnotationPresent(JPA_CONVERT)) {
                getLogger().logConfigMessage(MetadataLogger.OVERRIDE_ANNOTATION_WITH_XML, getAnnotation(JPA_CONVERT), getJavaClassName(), getLocation());
View Full Code Here

       
        // Set the converts if some are present.
        // Process all the join columns first.
        if (isAnnotationPresent(JPA_CONVERTS)) {
            for (Object convert : getAnnotation(JPA_CONVERTS).getAttributeArray("value")) {
                m_converts.add(new ConvertMetadata((MetadataAnnotation) convert, this));
            }
        }
       
        // Process the single convert second.
        if (isAnnotationPresent(JPA_CONVERT)) {
            m_converts.add(new ConvertMetadata(getAnnotation(JPA_CONVERT), this));
        }
       
        // Set the convert value if one is present.
        if (isAnnotationPresent(Convert.class)) {
            m_convert = (String) getAnnotation(Convert.class).getAttribute("value");
View Full Code Here

       
        // Set the converts if some are present.
        // Process all the join columns first.
        if (isAnnotationPresent(JPA_CONVERTS)) {
            for (Object convert : (Object[]) getAnnotation(JPA_CONVERTS).getAttributeArray("value")) {
                m_converts.add(new ConvertMetadata((MetadataAnnotation) convert, this));
            }
        }
       
        // Process the single convert second.
        if (isAnnotationPresent(JPA_CONVERT)) {
            m_converts.add(new ConvertMetadata(getAnnotation(JPA_CONVERT), this));
        }
    }
View Full Code Here

    public void processConverts() {
        if (m_converts.isEmpty()) {
            // Look for a Converts annotation.
            if (isAnnotationPresent(JPA_CONVERTS)) {
                for (Object convert : (Object[]) getAnnotation(JPA_CONVERTS).getAttributeArray("value")) {
                    processConvert(new ConvertMetadata((MetadataAnnotation) convert, this));
                }
            } else {
                // Look for a Convert annotation
                if (isAnnotationPresent(JPA_CONVERT)) {   
                    processConvert(new ConvertMetadata(getAnnotation(JPA_CONVERT), this));
                }
            }
        } else {
            if (isAnnotationPresent(JPA_CONVERT)) {
                getLogger().logConfigMessage(MetadataLogger.OVERRIDE_ANNOTATION_WITH_XML, getAnnotation(JPA_CONVERT), getJavaClassName(), getLocation());
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.internal.jpa.metadata.converters.ConvertMetadata

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.