當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。