Package org.codehaus.aspectwerkz.extension.persistence.definition

Examples of org.codehaus.aspectwerkz.extension.persistence.definition.PersistentObjectDefinition


        if (def == null) throw new IllegalArgumentException("persistence definition can not be null");

        final List persistentObjectDefs = def.getPersistentObjects();

        for (Iterator it1 = persistentObjectDefs.iterator(); it1.hasNext();) {
            final PersistentObjectDefinition persistentObjectDef =
                    (PersistentObjectDefinition)it1.next();

            final List indexRefs = persistentObjectDef.getIndexRefs();
            final String persistentObjectTypeName = persistentObjectDef.getClassName();
            if (indexRefs.size() == 0) throw new RuntimeException("no indexes specified for persistent object: " + persistentObjectTypeName);

            Class persistentObjectType = null;
            try {
                persistentObjectType = m_loader.loadClass(persistentObjectTypeName);
View Full Code Here


     */
    private static void parsePersistentElements(
            final Element root,
            final PersistenceDefinition definition) {
        for (Iterator it1 = root.elementIterator("persistent"); it1.hasNext();) {
            final PersistentObjectDefinition persistentDef =
                    new PersistentObjectDefinition();

            final Element persistent = (Element)it1.next();
            for (Iterator it2 = persistent.attributeIterator(); it2.hasNext();) {
                Attribute attribute = (Attribute)it2.next();
                String name = attribute.getName().trim();
                String value = attribute.getValue().trim();
                if (name.equals("class")) {
                    persistentDef.setClassName(value);
                    continue;
                }
            }
            for (Iterator it2 = persistent.elementIterator(); it2.hasNext();) {
                Element nestedAdviceElement = (Element)it2.next();

                if (nestedAdviceElement.getName().trim().equals("index-ref")) {
                    IndexRefDefinition indexDef = new IndexRefDefinition();
                    indexDef.setName(nestedAdviceElement.attributeValue("name"));
                    indexDef.setMethod(nestedAdviceElement.attributeValue("method"));
                    persistentDef.addIndexRef(indexDef);
                }
            }

            definition.addPersistentObject(persistentDef);
        }
View Full Code Here

        if (def == null) throw new IllegalArgumentException("persistence definition can not be null");

        final List persistentObjectDefs = def.getPersistentObjects();

        for (Iterator it1 = persistentObjectDefs.iterator(); it1.hasNext();) {
            final PersistentObjectDefinition persistentObjectDef =
                    (PersistentObjectDefinition)it1.next();

            final List indexRefs = persistentObjectDef.getIndexRefs();
            final String persistentObjectTypeName = persistentObjectDef.getClassName();
            if (indexRefs.size() == 0) throw new RuntimeException("no indexes specified for persistent object: " + persistentObjectTypeName);

            Class persistentObjectType = null;
            try {
                persistentObjectType = m_loader.loadClass(persistentObjectTypeName);
View Full Code Here

     */
    private static void parsePersistentElements(
            final Element root,
            final PersistenceDefinition definition) {
        for (Iterator it1 = root.elementIterator("persistent"); it1.hasNext();) {
            final PersistentObjectDefinition persistentDef =
                    new PersistentObjectDefinition();

            final Element persistent = (Element)it1.next();
            for (Iterator it2 = persistent.attributeIterator(); it2.hasNext();) {
                Attribute attribute = (Attribute)it2.next();
                String name = attribute.getName().trim();
                String value = attribute.getValue().trim();
                if (name.equals("class")) {
                    persistentDef.setClassName(value);
                    continue;
                }
            }
            for (Iterator it2 = persistent.elementIterator(); it2.hasNext();) {
                Element nestedAdviceElement = (Element)it2.next();

                if (nestedAdviceElement.getName().trim().equals("index-ref")) {
                    IndexRefDefinition indexDef = new IndexRefDefinition();
                    indexDef.setName(nestedAdviceElement.attributeValue("name"));
                    indexDef.setMethod(nestedAdviceElement.attributeValue("method"));
                    persistentDef.addIndexRef(indexDef);
                }
            }

            definition.addPersistentObject(persistentDef);
        }
View Full Code Here

     */
    private static void parsePersistentElements(
            final Element root,
            final PersistenceDefinition definition) {
        for (Iterator it1 = root.elementIterator("persistent"); it1.hasNext();) {
            final PersistentObjectDefinition persistentDef =
                    new PersistentObjectDefinition();

            final Element persistent = (Element)it1.next();
            for (Iterator it2 = persistent.attributeIterator(); it2.hasNext();) {
                Attribute attribute = (Attribute)it2.next();
                String name = attribute.getName().trim();
                String value = attribute.getValue().trim();
                if (name.equals("class")) {
                    persistentDef.setClassName(value);
                    continue;
                }
            }
            for (Iterator it2 = persistent.elementIterator(); it2.hasNext();) {
                Element nestedAdviceElement = (Element)it2.next();

                if (nestedAdviceElement.getName().trim().equals("index-ref")) {
                    IndexRefDefinition indexDef = new IndexRefDefinition();
                    indexDef.setName(nestedAdviceElement.attributeValue("name"));
                    indexDef.setMethod(nestedAdviceElement.attributeValue("method"));
                    persistentDef.addIndexRef(indexDef);
                }
            }

            definition.addPersistentObject(persistentDef);
        }
View Full Code Here

        if (def == null) throw new IllegalArgumentException("persistence definition can not be null");

        final List persistentObjectDefs = def.getPersistentObjects();

        for (Iterator it1 = persistentObjectDefs.iterator(); it1.hasNext();) {
            final PersistentObjectDefinition persistentObjectDef =
                    (PersistentObjectDefinition)it1.next();

            final List indexRefs = persistentObjectDef.getIndexRefs();
            final String persistentObjectTypeName = persistentObjectDef.getClassName();
            if (indexRefs.size() == 0) throw new RuntimeException("no indexes specified for persistent object: " + persistentObjectTypeName);

            Class persistentObjectType = null;
            try {
                persistentObjectType = m_loader.loadClass(persistentObjectTypeName);
View Full Code Here

TOP

Related Classes of org.codehaus.aspectwerkz.extension.persistence.definition.PersistentObjectDefinition

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.