当前位置: 首页>>代码示例>>Java>>正文


Java IndexedPropertyMethodMetadata类代码示例

本文整理汇总了Java中com.buschmais.xo.spi.metadata.method.IndexedPropertyMethodMetadata的典型用法代码示例。如果您正苦于以下问题:Java IndexedPropertyMethodMetadata类的具体用法?Java IndexedPropertyMethodMetadata怎么用?Java IndexedPropertyMethodMetadata使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IndexedPropertyMethodMetadata类属于com.buschmais.xo.spi.metadata.method包,在下文中一共展示了IndexedPropertyMethodMetadata类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createEntityMetadata

import com.buschmais.xo.spi.metadata.method.IndexedPropertyMethodMetadata; //导入依赖的package包/类
@Override
   public DuctileVertexMetadata createEntityMetadata(AnnotatedType annotatedType,
    Map<Class<?>, TypeMetadata> metadataByType) {
VertexDefinition annotation = annotatedType.getAnnotation(VertexDefinition.class);
String value = null;
IndexedPropertyMethodMetadata<?> indexedProperty = null;
if (annotation != null) {
    value = annotation.value();
    if ((value == null) || (value.isEmpty())) {
	value = annotatedType.getName();
    }
    Class<?> usingIndexOf = annotation.usingIndexedPropertyOf();
    if (!Object.class.equals(usingIndexOf)) {
	TypeMetadata typeMetadata = metadataByType.get(usingIndexOf);
	indexedProperty = typeMetadata.getIndexedProperty();
    }
}
return new DuctileVertexMetadata(value, indexedProperty);
   }
 
开发者ID:PureSolTechnologies,项目名称:DuctileDB,代码行数:20,代码来源:DuctileMetadataFactory.java

示例2: checkAndInitializePropertyIndizes

import com.buschmais.xo.spi.metadata.method.IndexedPropertyMethodMetadata; //导入依赖的package包/类
private void checkAndInitializePropertyIndizes(Map<Class<?>, TypeMetadata> registeredMetadata) {
for (TypeMetadata metadata : registeredMetadata.values()) {
    IndexedPropertyMethodMetadata<?> indexedProperty = metadata.getIndexedProperty();
    if (indexedProperty != null) {
	DuctileIndexedPropertyMetadata datastoreMetadata = (DuctileIndexedPropertyMetadata) indexedProperty
		.getDatastoreMetadata();
	String name = datastoreMetadata.getName();
	Class<? extends Serializable> dataType = datastoreMetadata.getDataType();
	Class<? extends Element> type = datastoreMetadata.getType();
	boolean unique = datastoreMetadata.isUnique();
	logger.info("Indexed property '" + name + "' was found (unique=" + unique
		+ "). Check for presence of index...");
	ElementType elementType;
	if (DuctileVertex.class.isAssignableFrom(type)) {
	    elementType = ElementType.VERTEX;
	} else if (DuctileEdge.class.isAssignableFrom(type)) {
	    elementType = ElementType.EDGE;
	} else {
	    throw new XOException("Unsupported element type '" + type.getName() + "' found.");
	}
	checkAndCreatePropertyIndex(name, dataType, elementType, unique);
    }
}
   }
 
开发者ID:PureSolTechnologies,项目名称:DuctileDB,代码行数:25,代码来源:DuctileStore.java

示例3: checkAndInitializePropertyIndizes

import com.buschmais.xo.spi.metadata.method.IndexedPropertyMethodMetadata; //导入依赖的package包/类
private void checkAndInitializePropertyIndizes(
    Map<Class<?>, TypeMetadata> registeredMetadata) {
for (TypeMetadata metadata : registeredMetadata.values()) {
    IndexedPropertyMethodMetadata<?> indexedProperty = metadata
	    .getIndexedProperty();
    if (indexedProperty != null) {
	TitanIndexedPropertyMetadata datastoreMetadata = (TitanIndexedPropertyMetadata) indexedProperty
		.getDatastoreMetadata();
	String name = datastoreMetadata.getName();
	Class<?> dataType = datastoreMetadata.getDataType();
	Class<? extends Element> type = datastoreMetadata.getType();
	boolean unique = datastoreMetadata.isUnique();
	logger.info("Indexed property '" + name
		+ "' was found. Check for presence of index...");
	checkAndCreatePropertyIndex(name, dataType, type, unique);
    }
}
   }
 
开发者ID:PureSolTechnologies,项目名称:extended-objects-titan,代码行数:19,代码来源:TitanCassandraStore.java

示例4: createEntityMetadata

import com.buschmais.xo.spi.metadata.method.IndexedPropertyMethodMetadata; //导入依赖的package包/类
@Override
   public TitanVertexMetadata createEntityMetadata(
    AnnotatedType annotatedType,
    Map<Class<?>, TypeMetadata> metadataByType) {
VertexDefinition annotation = annotatedType
	.getAnnotation(VertexDefinition.class);
String value = null;
IndexedPropertyMethodMetadata<?> indexedProperty = null;
if (annotation != null) {
    value = annotation.value();
    if ((value == null) || (value.isEmpty())) {
	value = annotatedType.getName();
    }
    Class<?> usingIndexOf = annotation.usingIndexedPropertyOf();
    if (!Object.class.equals(usingIndexOf)) {
	TypeMetadata typeMetadata = metadataByType.get(usingIndexOf);
	indexedProperty = typeMetadata.getIndexedProperty();
    }
}
return new TitanVertexMetadata(value, indexedProperty);
   }
 
开发者ID:PureSolTechnologies,项目名称:extended-objects-titan,代码行数:22,代码来源:TitanMetadataFactory.java

示例5: createEntityMetadata

import com.buschmais.xo.spi.metadata.method.IndexedPropertyMethodMetadata; //导入依赖的package包/类
@Override
public NodeMetadata createEntityMetadata(AnnotatedType annotatedType, List<TypeMetadata> superTypes, Map<Class<?>, TypeMetadata> metadataByType) {
    Label labelAnnotation = annotatedType.getAnnotation(Label.class);
    L label = null;
    IndexedPropertyMethodMetadata<IndexedPropertyMetadata> indexedProperty = null;
    if (labelAnnotation != null) {
        String value = labelAnnotation.value();
        if (Label.DEFAULT_VALUE.equals(value)) {
            value = annotatedType.getName();
        }
        label = createLabel(value);
        Class<?> usingIndexOf = labelAnnotation.usingIndexedPropertyOf();
        if (!Object.class.equals(usingIndexOf)) {
            TypeMetadata typeMetadata = metadataByType.get(usingIndexOf);
            indexedProperty = typeMetadata.getIndexedProperty();
        }
    }
    boolean batchable = isBatchable(annotatedType);
    return new NodeMetadata<L>(label, indexedProperty, batchable);
}
 
开发者ID:buschmais,项目名称:extended-objects,代码行数:21,代码来源:AbstractNeo4jMetadataFactory.java

示例6: getIndexedPropertyMetadata

import com.buschmais.xo.spi.metadata.method.IndexedPropertyMethodMetadata; //导入依赖的package包/类
public static <L extends Neo4jLabel> PropertyMetadata getIndexedPropertyMetadata(EntityTypeMetadata<NodeMetadata<L>> type,
                                                                                 PrimitivePropertyMethodMetadata<PropertyMetadata> propertyMethodMetadata) {
    if (propertyMethodMetadata == null) {
        IndexedPropertyMethodMetadata<?> indexedProperty = type.getDatastoreMetadata().getUsingIndexedPropertyOf();
        if (indexedProperty == null) {
            throw new XOException("Type " + type.getAnnotatedType().getAnnotatedElement().getName() + " has no indexed property.");
        }
        propertyMethodMetadata = indexedProperty.getPropertyMethodMetadata();
    }
    return propertyMethodMetadata.getDatastoreMetadata();
}
 
开发者ID:buschmais,项目名称:extended-objects,代码行数:12,代码来源:MetadataHelper.java

示例7: ensureIndex

import com.buschmais.xo.spi.metadata.method.IndexedPropertyMethodMetadata; //导入依赖的package包/类
/**
 * Ensures that an index exists for the given entity and property.
 *
 * @param entityTypeMetadata
 *            The entity.
 * @param indexedProperty
 *            The index metadata.
 */
private void ensureIndex(DS session, EntityTypeMetadata<NodeMetadata<L>> entityTypeMetadata,
        IndexedPropertyMethodMetadata<IndexedPropertyMetadata> indexedProperty) {
    if (indexedProperty != null) {
        IndexedPropertyMetadata datastoreMetadata = indexedProperty.getDatastoreMetadata();
        if (datastoreMetadata.isCreate()) {
            L label = entityTypeMetadata.getDatastoreMetadata().getDiscriminator();
            PrimitivePropertyMethodMetadata<PropertyMetadata> propertyMethodMetadata = indexedProperty.getPropertyMethodMetadata();
            if (label != null && propertyMethodMetadata != null) {
                ensureIndex(session, label, propertyMethodMetadata, datastoreMetadata.isUnique());
            }
        }
    }
}
 
开发者ID:buschmais,项目名称:extended-objects,代码行数:22,代码来源:AbstractNeo4jDatastore.java

示例8: AbstractTypeMetadata

import com.buschmais.xo.spi.metadata.method.IndexedPropertyMethodMetadata; //导入依赖的package包/类
protected AbstractTypeMetadata(AnnotatedType annotatedType, Collection<TypeMetadata> superTypes, Collection<MethodMetadata<?, ?>> properties,
        IndexedPropertyMethodMetadata indexedProperty) {
    this.annotatedType = annotatedType;
    this.superTypes = superTypes;
    this.properties = properties;
    this.indexedProperty = indexedProperty;
}
 
开发者ID:buschmais,项目名称:extended-objects,代码行数:8,代码来源:AbstractTypeMetadata.java

示例9: find

import com.buschmais.xo.spi.metadata.method.IndexedPropertyMethodMetadata; //导入依赖的package包/类
@Override
public <T> ResultIterable<T> find(final Class<T> type, final Object value) {
    sessionContext.getCacheSynchronizationService().flush();
    EntityTypeMetadata<EntityMetadata> entityTypeMetadata = sessionContext.getMetadataProvider().getEntityMetadata(type);
    IndexedPropertyMethodMetadata indexedProperty = entityTypeMetadata.getIndexedProperty();
    Map<PrimitivePropertyMethodMetadata<PropertyMetadata>, Object> exampleEntity = new HashMap<>(1);
    if (indexedProperty != null) {
        exampleEntity.put(indexedProperty.getPropertyMethodMetadata(), value);
    } else {
        exampleEntity.put(null, value);
    }
    return findByExample(type, exampleEntity);
}
 
开发者ID:buschmais,项目名称:extended-objects,代码行数:14,代码来源:XOManagerImpl.java

示例10: DuctileVertexMetadata

import com.buschmais.xo.spi.metadata.method.IndexedPropertyMethodMetadata; //导入依赖的package包/类
public DuctileVertexMetadata(String discriminator,
		IndexedPropertyMethodMetadata<?> indexedProperty) {
	super();
	this.discriminator = discriminator;
	this.indexedProperty = indexedProperty;
}
 
开发者ID:PureSolTechnologies,项目名称:DuctileDB,代码行数:7,代码来源:DuctileVertexMetadata.java

示例11: getIndexedProperty

import com.buschmais.xo.spi.metadata.method.IndexedPropertyMethodMetadata; //导入依赖的package包/类
public IndexedPropertyMethodMetadata<?> getIndexedProperty() {
	return indexedProperty;
}
 
开发者ID:PureSolTechnologies,项目名称:DuctileDB,代码行数:4,代码来源:DuctileVertexMetadata.java

示例12: TitanVertexMetadata

import com.buschmais.xo.spi.metadata.method.IndexedPropertyMethodMetadata; //导入依赖的package包/类
public TitanVertexMetadata(String discriminator,
		IndexedPropertyMethodMetadata<?> indexedProperty) {
	super();
	this.discriminator = discriminator;
	this.indexedProperty = indexedProperty;
}
 
开发者ID:PureSolTechnologies,项目名称:extended-objects-titan,代码行数:7,代码来源:TitanVertexMetadata.java

示例13: NodeMetadata

import com.buschmais.xo.spi.metadata.method.IndexedPropertyMethodMetadata; //导入依赖的package包/类
public NodeMetadata(L label, IndexedPropertyMethodMetadata<IndexedPropertyMetadata> usingIndexedPropertyOf, boolean batchable) {
    super(batchable);
    this.label = label;
    this.usingIndexedPropertyOf = usingIndexedPropertyOf;
}
 
开发者ID:buschmais,项目名称:extended-objects,代码行数:6,代码来源:NodeMetadata.java

示例14: getUsingIndexedPropertyOf

import com.buschmais.xo.spi.metadata.method.IndexedPropertyMethodMetadata; //导入依赖的package包/类
public IndexedPropertyMethodMetadata<IndexedPropertyMetadata> getUsingIndexedPropertyOf() {
    return usingIndexedPropertyOf;
}
 
开发者ID:buschmais,项目名称:extended-objects,代码行数:4,代码来源:NodeMetadata.java

示例15: AbstractDatastoreTypeMetadata

import com.buschmais.xo.spi.metadata.method.IndexedPropertyMethodMetadata; //导入依赖的package包/类
protected AbstractDatastoreTypeMetadata(AnnotatedType annotatedType, Collection<TypeMetadata> superTypes, Collection<MethodMetadata<?, ?>> properties, IndexedPropertyMethodMetadata indexedProperty, DatastoreMetadata datastoreMetadata) {
    super(annotatedType, superTypes, properties, indexedProperty);
    this.datastoreMetadata = datastoreMetadata;
}
 
开发者ID:buschmais,项目名称:extended-objects,代码行数:5,代码来源:AbstractDatastoreTypeMetadata.java


注:本文中的com.buschmais.xo.spi.metadata.method.IndexedPropertyMethodMetadata类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。