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

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


     * INTERNAL:
     * Process this converter for the given mapping.
     */
    public void process(DatabaseMapping mapping, boolean isForMapKey, String attributeName) {
        if (mapping.isDirectMapMapping() && isForMapKey) {
            ((DirectMapMapping) mapping).setKeyConverter(new ConverterClass(getJavaClassName(), isForMapKey, fieldClassification.getName()));
        } else if (mapping.isDirectCollectionMapping()) {
            ((DirectCollectionMapping) mapping).setValueConverter(new ConverterClass(getJavaClassName(), isForMapKey, fieldClassification.getName()));
        } else if (mapping.isDirectToFieldMapping()) {
            ((AbstractDirectMapping) mapping).setConverter(new ConverterClass(getJavaClassName(), isForMapKey, fieldClassification.getName()));
        } else if (mapping.isAggregateObjectMapping()) {
            ((AggregateObjectMapping) mapping).addConverter(new ConverterClass(getJavaClassName(), isForMapKey, fieldClassification.getName()), attributeName);
        else if (mapping.isAggregateCollectionMapping()) {
            // TODO: Be nice to support converters on AggregateCollections keys.
            // For now they are silently ignored.
        }
    }
View Full Code Here


     * INTERNAL:
     * Process this converter for the given mapping.
     */
    public void process(DatabaseMapping mapping, boolean isForMapKey, String attributeName, boolean disableConversion) {
        String fieldClassificationName = getClassificationType(disableConversion);
        ConverterClass converterClass = new ConverterClass(getJavaClassName(), isForMapKey, fieldClassificationName, disableConversion);
       
        if (mapping.isDirectMapMapping() && isForMapKey) {
            ((DirectMapMapping) mapping).setKeyConverter(converterClass);
            ((DirectMapMapping) mapping).setDirectKeyFieldClassificationName(fieldClassificationName);
        } else if (mapping.isDirectCollectionMapping()) {
View Full Code Here

TOP

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

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.