Package org.apache.tapestry5.annotations

Examples of org.apache.tapestry5.annotations.SessionState.create()


        for (TransformField field : transformation.matchFieldsWithAnnotation(ApplicationState.class))
        {
            ApplicationState annotation = field.getAnnotation(ApplicationState.class);

            fields.put(field, annotation.create());

            field.claim(annotation);
        }

        for (TransformField field : transformation.matchFieldsWithAnnotation(SessionState.class))
View Full Code Here


        for (TransformField field : transformation.matchFieldsWithAnnotation(SessionState.class))
        {
            SessionState annotation = field.getAnnotation(SessionState.class);

            fields.put(field, annotation.create());

            field.claim(annotation);
        }

        for (Map.Entry<TransformField, Boolean> e : fields.entrySet())
View Full Code Here

        for (String name : asoNames)
        {
            ApplicationState applicationState = transformation.getFieldAnnotation(name, ApplicationState.class);

            fields.put(name, applicationState.create());
        }


        List<String> ssoNames = transformation.findFieldsWithAnnotation(SessionState.class);
View Full Code Here

        String readMethodName = transformation.newMemberName("read", fieldName);

        TransformMethodSignature readMethodSignature = new TransformMethodSignature(Modifier.PRIVATE, fieldType,
                                                                                    readMethodName, null, null);

        String methodName = annotation.create() ? "get" : "getIfExists";

        String body = format("return (%s) %s.%s(%s);", fieldType, managerFieldName, methodName, typeFieldName);

        transformation.addMethod(readMethodSignature, body);
View Full Code Here

    {
        for (PlasticField field : plasticClass.getFieldsWithAnnotation(SessionState.class))
        {
            SessionState annotation = field.getAnnotation(SessionState.class);

            transform(plasticClass, field, annotation.create());

            field.claim(annotation);
        }
    }
View Full Code Here

    {
        for (TransformField field : transformation.matchFieldsWithAnnotation(SessionState.class))
        {
            SessionState annotation = field.getAnnotation(SessionState.class);

            transform(transformation, field, annotation.create());

            field.claim(annotation);
        }
    }
View Full Code Here

        for (TransformField field : transformation.matchFieldsWithAnnotation(SessionState.class))
        {
            SessionState annotation = field.getAnnotation(SessionState.class);

            fields.put(field, annotation.create());

            field.claim(annotation);
        }

        for (Map.Entry<TransformField, Boolean> e : fields.entrySet())
View Full Code Here

        for (String name : ssoNames)
        {
            SessionState sessionState = transformation.getFieldAnnotation(name, SessionState.class);

            fields.put(name, sessionState.create());
        }


        if (fields.isEmpty()) return;
View Full Code Here

                                                   new ClassNameLocatorImpl(new ClasspathURLConverterImpl())));

        replay();
        HibernateSessionSource source = new HibernateSessionSourceImpl(log, filters);

        Session session = source.create();
        assertNotNull(session);

        // make sure it found the entity in the package
        ClassMetadata meta = session.getSessionFactory().getClassMetadata(User.class);
        assertEquals(meta.getEntityName(), "org.example.app0.entities.User");
View Full Code Here

        replay();

        HibernateSessionSource source = new HibernateSessionSourceImpl(log, filters);

        Session session = source.create();
        Assert.assertNotNull(session);

        // make sure it found the entity in the package
        ClassMetadata meta = session.getSessionFactory().getClassMetadata(User.class);
        Assert.assertEquals(meta.getEntityName(), "org.example.app0.entities.User");
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.