Examples of JpaAttributes


Examples of org.apache.cayenne.jpa.map.JpaAttributes

                AnnotatedElement element,
                AnnotationProcessorStack context) {

            JpaMappedSuperclass superclass = new JpaMappedSuperclass();
            superclass.setClassName(((Class<?>) element).getName());
            superclass.setAttributes(new JpaAttributes());
            context.push(superclass);
        }
View Full Code Here

Examples of org.apache.cayenne.jpa.map.JpaAttributes

            if (abstractEntity.getClassName() == null) {
                return false;
            }

            if (abstractEntity.getAttributes() == null) {
                abstractEntity.setAttributes(new JpaAttributes());
            }

            // * default persistent fields
            JpaClassDescriptor descriptor = abstractEntity.getClassDescriptor();

View Full Code Here

Examples of org.apache.cayenne.jpa.map.JpaAttributes

        void processProperty(
                JpaAbstractEntity entity,
                JpaClassDescriptor descriptor,
                JpaPropertyDescriptor property) {

            JpaAttributes attributes = entity.getAttributes();
            if (attributes.getAttribute(property.getName()) != null) {
                return;
            }

            if (property.isDefaultNonRelationalType()) {

                JpaBasic attribute = new JpaBasic();

                attribute.setPropertyDescriptor(property);
                attribute.setName(property.getName());
                attributes.getBasicAttributes().add(attribute);
            }
            else {
                String path = descriptor.getManagedClass().getName()
                        + "."
                        + property.getName();
View Full Code Here

Examples of org.apache.cayenne.jpa.map.JpaAttributes

                AnnotationProcessorStack context) {
            Entity entityAnnotation = element.getAnnotation(Entity.class);

            JpaEntity entity = new JpaEntity();
            entity.setClassName(((Class) element).getName());
            entity.setAttributes(new JpaAttributes());

            if (!Util.isEmptyString(entityAnnotation.name())) {
                entity.setName(entityAnnotation.name());
            }
View Full Code Here

Examples of org.apache.cayenne.jpa.map.JpaAttributes

                AnnotatedElement element,
                AnnotationProcessorStack context) {

            JpaEmbeddable embeddable = new JpaEmbeddable();
            embeddable.setClassName(((Class) element).getName());
            embeddable.setAttributes(new JpaAttributes());
            context.push(embeddable);
        }
View Full Code Here

Examples of org.apache.cayenne.jpa.map.JpaAttributes

                AnnotatedElement element,
                AnnotationProcessorStack context) {

            JpaMappedSuperclass superclass = new JpaMappedSuperclass();
            superclass.setClassName(((Class) element).getName());
            superclass.setAttributes(new JpaAttributes());
            context.push(superclass);
        }
View Full Code Here

Examples of org.apache.cayenne.jpa.map.JpaAttributes

                    entity.setTable(table);
                }
            }

            if (abstractEntity.getAttributes() == null) {
                abstractEntity.setAttributes(new JpaAttributes());
            }

            // * default persistent fields
            JpaClassDescriptor descriptor = abstractEntity.getClassDescriptor();

View Full Code Here

Examples of org.apache.cayenne.jpa.map.JpaAttributes

        void processProperty(
                JpaAbstractEntity entity,
                JpaClassDescriptor descriptor,
                JpaPropertyDescriptor property) {

            JpaAttributes attributes = entity.getAttributes();
            if (attributes.getAttribute(property.getName()) != null) {
                return;
            }

            if (property.isDefaultNonRelationalType()) {

                JpaBasic attribute = new JpaBasic();

                attribute.setPropertyDescriptor(property);
                attribute.setName(property.getName());
                attributes.getBasicAttributes().add(attribute);
            }
            else {
                String path = descriptor.getManagedClass().getName()
                        + "."
                        + property.getName();
View Full Code Here

Examples of org.apache.cayenne.jpa.map.JpaAttributes

    protected void assertEmbeddable1(JpaEmbeddable embeddable1) {
        assertEquals("org.apache.cayenne.jpa.entity.MockEmbed1", embeddable1
                .getClassName());

        JpaAttributes attributes = embeddable1.getAttributes();
        assertNotNull(attributes);
        assertEquals(2, attributes.size());
        assertEquals(1, attributes.getBasicAttributes().size());
        JpaBasic a1 = attributes.getBasicAttribute("ea1");

        assertEquals("ea1", a1.getName());
        assertTrue(a1.isOptional());
        assertSame(FetchType.EAGER, a1.getFetch());

        assertTrue(a1.isLob());
        assertNotNull(a1.getColumn());
        assertEquals("column9", a1.getColumn().getName());

        assertEquals(1, attributes.getTransientAttributes().size());
        JpaTransient a2 = attributes.getTransientAttribute("ea2");
        assertEquals("ea2", a2.getName());
    }
View Full Code Here

Examples of org.apache.cayenne.jpa.map.JpaAttributes

                int split = fqName.lastIndexOf('.');
                entity.setName(split > 0 ? fqName.substring(split + 1) : fqName);
            }

            if (entity.getAttributes() == null) {
                entity.setAttributes(new JpaAttributes());
            }

            // * default persistent fields
            JpaClassDescriptor descriptor = entity.getClassDescriptor();

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.