@Override public String toString() { return getFullyQualifiedName(); } }
@Override public String toString() { return getFullyQualifiedName(); } }
/** * Gets the OData type name of the property; if the property is a collection, gets the OData type name of the * elements of the collection. * * @param property The property. * @return The OData type name of the property; if the property is a collection, the OData type name of the elements * of the collection. */ public static String getPropertyTypeName(StructuralProperty property) { return property.isCollection() ? property.getElementTypeName() : property.getTypeName(); }
private String getEntityTypeName(QueryOperation operation, EntityDataModel entityDataModel) { EntitySet entitySet = entityDataModel.getEntityContainer().getEntitySet(operation.entitySetName()); // If the supplied entity is an EntitySet, return entity set type. Else check for Singleton if (entitySet != null) { return entitySet.getTypeName(); } else { Singleton singleton = entityDataModel.getEntityContainer().getSingleton(operation.entitySetName()); if (singleton != null) { return singleton.getTypeName(); } } return null; } }
private EntitySet getEntitySet(Object entity) { String entityTypeName = getEntityType(entity).getFullyQualifiedName(); for (EntitySet eSet : entityDataModel.getEntityContainer().getEntitySets()) { if (eSet.getTypeName().equals(entityTypeName)) { return eSet; } } return null; }
/** * Returns {@code true} if the OData type is a structured type, {@code false} otherwise. * * @param type The OData type. * @return {@code true} if the OData type is a structured type, {@code false} otherwise. */ public static boolean isStructuredType(Type type) { MetaType metaType = type.getMetaType(); return metaType == MetaType.ENTITY || metaType == MetaType.COMPLEX; }
public B setType(Type type, boolean isCollectionForStructureProperty) { this.typeName = type.getFullyQualifiedName(); this.isCollection = isCollectionForStructureProperty; return self; }
@Override public String getFullyQualifiedName() { return getNamespace() + "." + getName(); }
@Override public String getFullyQualifiedName() { return getNamespace() + "." + getName(); }
private String getEntityTypeName(QueryOperation operation, EntityDataModel entityDataModel) { EntitySet entitySet = entityDataModel.getEntityContainer().getEntitySet(operation.entitySetName()); // If the supplied entity is an EntitySet, return entity set type. Else check for Singleton if (entitySet != null) { return entitySet.getTypeName(); } else { Singleton singleton = entityDataModel.getEntityContainer().getSingleton(operation.entitySetName()); if (singleton != null) { return singleton.getTypeName(); } } return null; } }
private EntitySet getEntitySet(Object entity) { String entityTypeName = getEntityType(entity).getFullyQualifiedName(); for (EntitySet eSet : entityDataModel.getEntityContainer().getEntitySets()) { if (eSet.getTypeName().equals(entityTypeName)) { return eSet; } } return null; }
/** * Gets the OData type name of the property; if the property is a collection, gets the OData type name of the * elements of the collection. * * @param property The property. * @return The OData type name of the property; if the property is a collection, the OData type name of the elements * of the collection. */ public static String getPropertyTypeName(StructuralProperty property) { return property.isCollection() ? property.getElementTypeName() : property.getTypeName(); }
/** * Returns {@code true} if the OData type is a primitive type, {@code false} otherwise. * * @param type The OData type. * @return {@code true} if the OData type is a primitive type, {@code false} otherwise. */ public static boolean isPrimitiveType(Type type) { return type.getMetaType() == MetaType.PRIMITIVE; }
public B setType(Type type, boolean isCollectionForStructureProperty) { this.typeName = type.getFullyQualifiedName(); this.isCollection = isCollectionForStructureProperty; return self; }
/** * Returns {@code true} if the OData type is a complex type, {@code false} otherwise. * * @param type The OData type. * @return {@code true} if the OData type is a complex type, {@code false} otherwise. */ public static boolean isComplexType(Type type) { return type.getMetaType() == MetaType.COMPLEX; }
@Override public String toString() { if (collection) { return "Collection(" + type.getFullyQualifiedName() + ")"; } else { return type.getFullyQualifiedName(); } } }
/** * Returns {@code true} if the OData type is an entity type, {@code false} otherwise. * * @param type The OData type. * @return {@code true} if the OData type is an entity type, {@code false} otherwise. */ public static boolean isEntityType(Type type) { return type.getMetaType() == MetaType.ENTITY; }
/** * Returns {@code true} if the OData type is a structured type, {@code false} otherwise. * * @param type The OData type. * @return {@code true} if the OData type is a structured type, {@code false} otherwise. */ public static boolean isStructuredType(Type type) { MetaType metaType = type.getMetaType(); return metaType == MetaType.ENTITY || metaType == MetaType.COMPLEX; }
/** * Returns {@code true} if the OData type is an entity type, {@code false} otherwise. * * @param type The OData type. * @return {@code true} if the OData type is an entity type, {@code false} otherwise. */ public static boolean isEntityType(Type type) { return type.getMetaType() == MetaType.ENTITY; }
/** * Returns {@code true} if the OData type is a complex type, {@code false} otherwise. * * @param type The OData type. * @return {@code true} if the OData type is a complex type, {@code false} otherwise. */ public static boolean isComplexType(Type type) { return type.getMetaType() == MetaType.COMPLEX; }