org.apache.ignite.internal.processors.cache.query

## Interface GridCacheSqlMetadata

All Superinterfaces:
  Externalizable, Serializable

    public interface GridCacheSqlMetadata
    extends Externalizable

Metadata for Ignite cache.

Metadata describes objects stored in the cache and can be used to gather information about what can be queried using Ignite cache queries feature.

### Method Summary

Methods
`String` `cacheName()` Cache name.
`Map<String,String>` `fields(String type)` Gets fields and their class names for provided type.
`Collection<GridCacheSqlIndexMetadata>` `indexes(String type)` Gets descriptors of indexes created for provided type.
`String` `keyClass(String type)` Gets key class name for provided type.
`Collection<String>` `types()` Gets the collection of types stored in cache.
`String` `valueClass(String type)` Gets value class name for provided type.

### Methods inherited from interface java.io.Externalizable

`readExternal, writeExternal`

### Method Detail

#### cacheName

    String cacheName()

Cache name.

Returns:
  Cache name.

#### types

    Collection<String> types()

Gets the collection of types stored in cache.

By default, type name is equal to simple class name of stored object, but it can depend on implementation of `IndexingSpi`.

Returns:
  Collection of available types.

#### keyClass

    @Nullable
    String keyClass(String type)

Gets key class name for provided type.

Use `types()` method to get available types.

Parameters:
  `type` - Type name.
Returns:
  Key class name or `null` if type name is unknown.

#### valueClass

    @Nullable
    String valueClass(String type)

Gets value class name for provided type.

Use `types()` method to get available types.

Parameters:
  `type` - Type name.
Returns:
  Value class name or `null` if type name is unknown.

#### fields

    @Nullable
    Map<String,String> fields(String type)

Gets fields and their class names for provided type.

Parameters:
  `type` - Type name.
Returns:
  Fields map or `null` if type name is unknown.

#### indexes

    Collection<GridCacheSqlIndexMetadata> indexes(String type)

Gets descriptors of indexes created for provided type. See `GridCacheSqlIndexMetadata` javadoc for more information.

Parameters:
  `type` - Type name.
Returns:
  Index descriptors.
See Also:
  `GridCacheSqlIndexMetadata`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.4.0
Release Date | : September 24 2015