Package oracle.toplink.essentials.internal.ejb.cmp3.xml

Examples of oracle.toplink.essentials.internal.ejb.cmp3.xml.XMLHelper


     */
    protected ClassAccessor processAccessor(MetadataDescriptor descriptor) {
        Node node = m_helper.locateEntityNode(descriptor.getJavaClass());
       
        if (node != null) {
            XMLClassAccessor accessor = new XMLClassAccessor(new MetadataClass(descriptor.getJavaClass()), node, m_helper, m_processor, descriptor);
            descriptor.setClassAccessor(accessor);
            accessor.process();
            accessor.setIsProcessed();
            return accessor;
        } else {
View Full Code Here


     */
    protected ClassAccessor processAccessor(MetadataDescriptor descriptor) {
        Node node = m_helper.locateEntityNode(descriptor.getJavaClass());
       
        if (node != null) {
            XMLClassAccessor accessor = new XMLClassAccessor(new MetadataClass(descriptor.getJavaClass()), node, m_helper, m_processor, descriptor);
            descriptor.setClassAccessor(accessor);
            accessor.process();
            accessor.setIsProcessed();
            return accessor;
        } else {
View Full Code Here

                }
            }
        }
       
        if (node != null) {
            XMLClassAccessor accessor = new XMLClassAccessor(new MetadataClass(descriptor.getJavaClass()), node, xmlhelper, m_processor, descriptor);
            descriptor.setClassAccessor(accessor);
            accessor.process();
            accessor.setIsProcessed();
            return accessor;
        } else {
View Full Code Here

     * Create mappings from the fields directly.
     */
    protected void processAccessorFields() {
        for (Field field : MetadataHelper.getFields(getJavaClass())) {
            if (isValidPersistenceField(field)) {
                processAccessor(buildAccessor(new MetadataField(field)));
            }
        }
    }
View Full Code Here

           
            if (field == null) {
                m_validator.throwUnableToDetermineClassForField(attributeName, getJavaClass());
            }
           
            accessibleObject = new MetadataField(field);
        }
       
        String nodeName = node.getLocalName();
       
        if (nodeName.equals(XMLConstants.ONE_TO_ONE)) {
View Full Code Here

     * Create mappings via the class properties.
     */
    protected void processAccessorMethods() {
        for (Method method : MetadataHelper.getDeclaredMethods(getJavaClass())) {
            if (isValidPersistenceMethod(method)) {
                processAccessor(buildAccessor(new MetadataMethod(method)));
            }
        }
    }
View Full Code Here

           
            if (method == null) {
                m_validator.throwUnableToDetermineClassForProperty(attributeName, getJavaClass());
            }
           
            accessibleObject = new MetadataMethod(method);
        } else {
            Field field = MetadataHelper.getFieldForName(attributeName, getJavaClass());
           
            if (field == null) {
                m_validator.throwUnableToDetermineClassForField(attributeName, getJavaClass());
View Full Code Here

     * @See BasicCollectionAccessor and BasicMapAccessor.
     */
    public DatabaseField getDatabaseField(String loggingCtx) {
        // Check if we have an attribute override first, otherwise process for
        // a column (ignoring if for a key column on a basic map)
        MetadataColumn column;
        if (m_descriptor.hasAttributeOverrideFor(getAttributeName())) {
            column = m_descriptor.getAttributeOverrideFor(getAttributeName());
        } else {
            column = getColumn(loggingCtx);
        }
       
        // Get the actual database field and apply any defaults.
        DatabaseField field = column.getDatabaseField();
       
        // Set the correct field name, defaulting and logging when necessary.
        String defaultName = column.getUpperCaseAttributeName();
        field.setName(getName(field.getName(), defaultName, loggingCtx));
                   
        return field;
    }
View Full Code Here

        if (column.loadedFromXML()) {
            m_descriptor.addAttributeOverride(column);
        } else {
            // Attribute overrides from annotations should not override
            // those loaded from XML.
            MetadataColumn existingColumn = m_descriptor.getAttributeOverrideFor(attributeName);
           
            if (existingColumn == null || ! existingColumn.loadedFromXML()) {
                m_descriptor.addAttributeOverride(column);
            } else {
                // WIP should log a warning.
            }
        }
View Full Code Here

    protected void processAttributeOverrides() {
        // Look for an @AttributeOverrides.
        AttributeOverrides attributeOverrides = getAnnotation(AttributeOverrides.class)
        if (attributeOverrides != null) {
            for (AttributeOverride attributeOverride : attributeOverrides.value()) {
                processAttributeOverride(new MetadataColumn(attributeOverride, getAnnotatedElement()));
            }
        }
       
        // Look for an @AttributeOverride.
        AttributeOverride attributeOverride = getAnnotation(AttributeOverride.class);
        if (attributeOverride != null) {
            processAttributeOverride(new MetadataColumn(attributeOverride, getAnnotatedElement()));
        }
    }
View Full Code Here

TOP

Related Classes of oracle.toplink.essentials.internal.ejb.cmp3.xml.XMLHelper

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.