Package com.mysema.query.codegen

Examples of com.mysema.query.codegen.Property


                    } else {
                        String name = component.getNodeName();
                        Class<?> clazz = component.getType().getReturnedClass();
                        Type propertyType = getType(pc.getMappedClass(), clazz, name);
                        AnnotatedElement annotated = getAnnotatedElement(pc.getMappedClass(), name);
                        Property property = createProperty(entityType, name, propertyType, annotated);
                        entityType.addProperty(property);
                        // handle component properties
                        EntityType embeddedType = createEmbeddableType(propertyType);
                        while (properties.hasNext()) {
                            handleProperty(embeddedType, clazz, (org.hibernate.mapping.Property) properties.next());
View Full Code Here


                    handleProperty(embeddedType, embeddedClass, (org.hibernate.mapping.Property)properties.next());
                }
            }
        }

        Property property = createProperty(entityType, p.getName(), propertyType, annotated);
        entityType.addProperty(property);
    }
View Full Code Here

            }
        } else {
            propertyType = getPropertyType(p, propertyType);
        }

        Property property = createProperty(entityType, p.getName(), propertyType, annotated);
        entityType.addProperty(property);
    }
View Full Code Here

        }

        // fixed types override property types
        propertyTypes.putAll(fixedTypes);
        for (Map.Entry<String, Annotations> entry : propertyAnnotations.entrySet()) {
            Property property = toProperty(entityType, entry.getKey(), propertyTypes.get(entry.getKey()), entry.getValue());
            if (property != null) {
                entityType.addProperty(property);
            }
        }
View Full Code Here

        List<String> inits = Collections.<String>emptyList();
        if (annotations.isAnnotationPresent(QueryInit.class)) {
            inits = ImmutableList.copyOf(annotations.getAnnotation(QueryInit.class).value());
        }

        return new Property(entityType, name, propertyType, inits);
    }
View Full Code Here

        StringBuilder columnEquals = new StringBuilder();
        StringBuilder toString = new StringBuilder();
        List<String> properties = new ArrayList<String>();
        for (PrimaryKeyData pk : primaryKeys) {
            for (String column : pk.getColumns()) {
                Property property = columnToProperty.get(column);
                String propName = property.getEscapedName();
                if (anyColumnIsNull.length() > 0) {
                    anyColumnIsNull.append(" || ");
                    columnEquals.append(" && ");
                    toString.append("+ \";\" + ");
                } else {
View Full Code Here

        assertEquals("superiorPk", namingStrategy.getPropertyNameForPrimaryKey("PK_SUPERIOR", entityModel));
    }

    @Test
    public void GetPropertyNameForPrimaryKey_Clash() {
        entityModel.addProperty(new Property(entityModel, "id", Types.STRING));
        assertEquals("idPk", namingStrategy.getPropertyNameForPrimaryKey("id", entityModel));
    }
View Full Code Here

TOP

Related Classes of com.mysema.query.codegen.Property

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.