private Stats counts = new Stats(); @Property("result") private String outColl; private long timeMillis;
private EntityPropertyBinding buildEntityProperty(Field simpleField, String parentProperty) { EntityPropertyBinding entityProperty = new EntityPropertyBinding(); Property propertyAnnotation = simpleField.getAnnotation(Property.class); if (propertyAnnotation == null) { // Mapping store column doesn't exist for field, consider it as non store property. // should we consider property name as store field name in absence of annotation???? // entityProperty.setStoreFieldName(simpleField.getName()); return null; } entityProperty.setStoreFieldName(propertyAnnotation.value()); entityProperty.setName(simpleField.getName()); entityProperty.setType(simpleField.getType()); StringBuilder nameBuilder = new StringBuilder(); if (StringUtils.isNotEmpty(parentProperty)) { nameBuilder.append(parentProperty).append(PROPERTY_SEPARATOR); } nameBuilder.append(simpleField.getName()); entityProperty.setNameFullPath(nameBuilder.toString()); return entityProperty; }
public Class getConcreteType() { final Embedded e = getAnnotation(Embedded.class); if (e != null) { final Class concrete = e.concreteClass(); if (concrete != Object.class) { return concrete; } } final Property p = getAnnotation(Property.class); if (p != null) { final Class concrete = p.concreteClass(); if (concrete != Object.class) { return concrete; } } return getType(); } }
public Class getConcreteType() { Embedded e = getAnnotation(Embedded.class); if (e != null) { Class concrete = e.concreteClass(); if (concrete != Object.class) { return concrete; } } Property p = getAnnotation(Property.class); if (p != null) { Class concrete = p.concreteClass(); if (concrete != Object.class) { return concrete; } } return getType(); } }
public class NestedEntity { @Property(value = "nestedClassName") private String name; private String nestedClassDescription; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getNestedClassDescription() { return nestedClassDescription; } public void setNestedClassDescription(String nestedClassDescription) { this.nestedClassDescription = nestedClassDescription; } }
private NestedEntity nestedObject; @Property(value = "annotatedProperty") private String annotatedProperty; private String property2;
private final Stats counts = new Stats(); @Property("result") private String outColl; private long timeMillis;