private boolean isIndexed(Method method) { final AnnotationDelegate annotations = Common.getAnnotationDelegate(fieldNameConverter, method); final Indexed indexed = annotations.getAnnotation(Indexed.class); return indexed != null; }
private boolean isIndexed(Method method) { final AnnotationDelegate annotations = Common.getAnnotationDelegate(fieldNameConverter, method); final Indexed indexed = annotations.getAnnotation(Indexed.class); return indexed != null; }
public static List<String> getSearchableFields(EntityManager manager, Class<? extends RawEntity<?>> type) { List<String> back = new ArrayList<String>(); for (Method m : type.getMethods()) { Searchable annot = getAnnotationDelegate(manager.getNameConverters().getFieldNameConverter(), m).getAnnotation(Searchable.class); if (annot != null) { Class<?> attributeType = Common.getAttributeTypeFromMethod(m); String name = manager.getNameConverters().getFieldNameConverter().getName(m); // don't index Entity fields if (name != null && !RawEntity.class.isAssignableFrom(attributeType) && !back.contains(name)) { back.add(name); } } } return back; }
public static List<String> getSearchableFields(EntityManager manager, Class<? extends RawEntity<?>> type) { List<String> back = new ArrayList<String>(); for (Method m : type.getMethods()) { Searchable annot = getAnnotationDelegate(manager.getNameConverters().getFieldNameConverter(), m).getAnnotation(Searchable.class); if (annot != null) { Class<?> attributeType = Common.getAttributeTypeFromMethod(m); String name = manager.getNameConverters().getFieldNameConverter().getName(m); // don't index Entity fields if (name != null && !RawEntity.class.isAssignableFrom(attributeType) && !back.contains(name)) { back.add(name); } } } return back; }
@Nullable private DDLIndexField parseIndexField(@Nullable Method method) { if (method == null) { return null; } Class<?> type = Common.getAttributeTypeFromMethod(method); String attributeName = fieldNameConverter.getName(method); AnnotationDelegate annotations = Common.getAnnotationDelegate(fieldNameConverter, method); return DDLIndexField.builder() .fieldName(attributeName) .type(SchemaGenerator.getSQLTypeFromMethod(typeManager, type, method, annotations)) .build(); }
public boolean apply(Method m) { final AnnotationDelegate annotations = getAnnotationDelegate(converter, m); return !annotations.isAnnotationPresent(Ignore.class) && !annotations.isAnnotationPresent(OneToOne.class) && !annotations.isAnnotationPresent(OneToMany.class) && !annotations.isAnnotationPresent(ManyToMany.class); } });
@Nullable private DDLIndexField parseIndexField(@Nullable Method method) { if (method == null) { return null; } Class<?> type = Common.getAttributeTypeFromMethod(method); String attributeName = fieldNameConverter.getName(method); AnnotationDelegate annotations = Common.getAnnotationDelegate(fieldNameConverter, method); return DDLIndexField.builder() .fieldName(attributeName) .type(SchemaGenerator.getSQLTypeFromMethod(typeManager, type, method, annotations)) .build(); }
public boolean apply(Method m) { final AnnotationDelegate annotations = getAnnotationDelegate(converter, m); return !annotations.isAnnotationPresent(Ignore.class) && !annotations.isAnnotationPresent(OneToOne.class) && !annotations.isAnnotationPresent(OneToMany.class) && !annotations.isAnnotationPresent(ManyToMany.class); } });
final AnnotationDelegate annotations = Common.getAnnotationDelegate(fieldConverter, method);
final AnnotationDelegate annotations = Common.getAnnotationDelegate(fieldConverter, method);