Examples of EjbValueObjectTag


Examples of org.xdoclet.plugin.ejb.qtags.EjbValueObjectTag

                    log.debug("I DIDN't found cache entry for cacheKey='"+cacheKey+"'");
                }

                // By the use of MyQDoxFilterMetadataProvider, we are sure that if a ejb.value-object tag exists
                // It can only be one (at least in the normal run of this plugin
                EjbValueObjectTag valueTag = (EjbValueObjectTag) valueTags[0];
                retVal = new ValueObjectMetadata(javaClass, valueTag,
                        EjbRuntime.getPrimaryKeyClassPlugin().collectPkHierarchy(javaClass));

                // Lets start rolling
                //            retVal.setUpdatable(valueTag.isUpdatable());
                // TODO: Are we supporting hierarchaly generated files
                // similar to PrimaryKeys ?
                JavaMethod[] methods = javaClass.getMethods(true);
                JavaMethod method;

                for (int i = 0; i < methods.length; i++) {
                    method = methods[i];

                    if (log.isTraceEnabled()) {
                        // log.trace(method.getName() + " = " + method);
                        log.trace(method.getName() + " seeing if this is a value-object-field");
                    }

                    // Obtain extra method flags
                    int metaFlags = ejbUtils.getMethodMetadata(javaClass, method);

                    if (EjbUtils.hasFlag(metaFlags, EjbUtils.METADATA_METHOD_PRIMARY_KEY_FIELD) ||
                            EjbUtils.hasFlag(metaFlags, EjbUtils.METADATA_METHOD_PERSISTENCE_FIELD) ||
                            EjbUtils.hasFlag(metaFlags, EjbUtils.METADATA_METHOD_RELATION_FIELD)) {
                        if (log.isDebugEnabled()) {
                            log.debug(method.getName() +
                                " is candidate for checking. It's a persistence field, relation field or primary key field");
                        }

                        // Por aqui o resto das valida��es e l�gica
                        boolean isValueObjectField = isSelectedValueObjectField(valueTag.getMatch(), method);

                        // Primary key field must ALLWAYS be included ! (or then they must be checked if ....)
                        isValueObjectField = isValueObjectField ||
                            EjbUtils.hasFlag(metaFlags, EjbUtils.METADATA_METHOD_PRIMARY_KEY_FIELD);

                        if (isValueObjectField) {
                            EjbValueObjectFieldTag vTag = findMatchedTag(valueTag.getMatch(), method);
                            BeanProperty prop = javaClass.getBeanProperty(method.getPropertyName(), true);

                            if (log.isDebugEnabled()) {
                                log.debug(method.getName() + " is a value-object-field: matches or is a pk-field.");
                            }
View Full Code Here

Examples of org.xdoclet.plugin.ejb.qtags.EjbValueObjectTag

        return retVal;
    }

    protected String getPatternBasedUnqualifiedName(JavaClass javaClass) {
        EjbValueObjectTag valueObjectTag = (EjbValueObjectTag) javaClass.getTagByName(TagLibrary.EJB_VALUE_OBJECT);
        return ejbUtils.expandPattern(getPattern(valueObjectTag), valueObjectTag.getName_());
    }
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.