com.impetus.kundera.index.Index.name()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(3.3k)|赞(0)|评价(0)|浏览(119)

本文整理了Java中com.impetus.kundera.index.Index.name()方法的一些代码示例,展示了Index.name()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Index.name()方法的具体详情如下:
包路径:com.impetus.kundera.index.Index
类名称:Index
方法名:name

Index.name介绍

暂无

代码示例

代码示例来源:origin: Impetus/Kundera

  1. public static boolean isColumnInEmbeddableIndexable(Field embeddedField, String columnFieldName)
  2. {
  3. Class<?> embeddableClass = PropertyAccessorHelper.getGenericClass(embeddedField);
  4. IndexCollection indexCollection = embeddableClass.getAnnotation(IndexCollection.class);
  5. if (indexCollection != null && indexCollection.columns() != null)
  6. {
  7. for (com.impetus.kundera.index.Index column : indexCollection.columns())
  8. {
  9. if (columnFieldName != null && column != null && column.name() != null
  10. && column.name().equals(columnFieldName))
  11. {
  12. return true;
  13. }
  14. }
  15. }
  16. return false;
  17. }

代码示例来源:origin: Impetus/Kundera

  1. /**
  2. * @param entityClazz
  3. * @param pis
  4. * @param columnsNameToBeIndexed
  5. * @param columnsToBeIndexed
  6. */
  7. private static void getPropertyIndexes(Class<?> entityClazz, Map<String, PropertyIndex> pis,
  8. List<String> columnsNameToBeIndexed, Map<String, com.impetus.kundera.index.Index> columnsToBeIndexed)
  9. {
  10. for (Field f : entityClazz.getDeclaredFields())
  11. {
  12. if (f.isAnnotationPresent(Column.class))
  13. {
  14. String fieldName = f.getName();
  15. if (columnsToBeIndexed != null && !columnsToBeIndexed.isEmpty()
  16. && columnsToBeIndexed.containsKey(fieldName))
  17. {
  18. com.impetus.kundera.index.Index indexedColumn = columnsToBeIndexed.get(fieldName);
  19. pis.put(indexedColumn.name(),
  20. populatePropertyIndex(indexedColumn.name(), indexedColumn.type(), indexedColumn.max(),
  21. indexedColumn.min(), f));
  22. }
  23. else if (columnsNameToBeIndexed != null && !columnsNameToBeIndexed.isEmpty()
  24. && columnsNameToBeIndexed.contains(fieldName))
  25. {
  26. pis.put(fieldName, populatePropertyIndex(fieldName, null, null, null, f));
  27. }
  28. }
  29. }
  30. }

代码示例来源:origin: Impetus/Kundera

  1. /**
  2. * Returns list of indexed columns on {@code @Embeddable} entity
  3. *
  4. * @param entityMetadata
  5. * entity metadata
  6. * @return list of indexed columns
  7. */
  8. public static Map<String, PropertyIndex> getIndexesOnEmbeddable(Class<?> entityClazz)
  9. {
  10. Map<String, PropertyIndex> pis = new HashMap<String, PropertyIndex>();
  11. IndexCollection indexes = entityClazz.getAnnotation(IndexCollection.class);
  12. List<String> columnsNameToBeIndexed = null;
  13. Map<String, com.impetus.kundera.index.Index> columnsToBeIndexed = null;
  14. if (null != indexes)
  15. {
  16. columnsToBeIndexed = new HashMap<String, com.impetus.kundera.index.Index>();
  17. if (indexes.columns() != null && indexes.columns().length != 0)
  18. {
  19. for (com.impetus.kundera.index.Index indexedColumn : indexes.columns())
  20. {
  21. columnsToBeIndexed.put(indexedColumn.name(), indexedColumn);
  22. }
  23. }
  24. }
  25. getPropertyIndexes(entityClazz, pis, columnsNameToBeIndexed, columnsToBeIndexed);
  26. return pis;
  27. }

代码示例来源:origin: Impetus/Kundera

  1. List<String> columnsNameToBeIndexed = new ArrayList<String>();
  2. for (com.impetus.kundera.index.Index indexedColumn : indexes.columns()) {
  3. Attribute attrib = metaModel.getEntityAttribute(entity.getClass(), indexedColumn.name());
  4. columnsNameToBeIndexed.add(((AbstractAttribute) attrib).getJPAColumnName());

代码示例来源:origin: Impetus/Kundera

  1. prepareCompositeIndexName(indexedColumn.name(), entityType, metadata),
  2. populatePropertyIndex(indexedColumn.indexName(), indexedColumn.type(), null, null, null));
  3. indexedColumnsMap.put(indexedColumn.name(), indexedColumn);

相关文章