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

## Class GridCacheQueryManager.CacheSqlMetadata

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.query.GridCacheQueryManager.CacheSqlMetadata

All Implemented Interfaces:
  Externalizable, Serializable, GridCacheSqlMetadata

Direct Known Subclasses:
  GridCacheQuerySqlMetadataV2

Enclosing class:
  GridCacheQueryManager<K,V>

    public static class GridCacheQueryManager.CacheSqlMetadata
    extends Object
    implements GridCacheSqlMetadata

Cache metadata.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`CacheSqlMetadata()` Required by `Externalizable`.

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `cacheName()` Cache name.
`Map<String,Map<String,String>>` `fields()`
`Map<String,String>` `fields(String type)` Gets fields and their class names for provided type.
`Map<String,Collection<GridCacheSqlIndexMetadata>>` `indexes()`
`Collection<GridCacheSqlIndexMetadata>` `indexes(String type)` Gets descriptors of indexes created for provided type.
`String` `keyClass(String type)` Gets key class name for provided type.
`Map<String,String>` `keyClasses()`
`Collection<String>` `notNullFields(String type)` Gets not null fields.
`void` `readExternal(ObjectInput in)`
`String` `toString()`
`Collection<String>` `types()` Gets the collection of types stored in cache.
`Map<String,String>` `valClasses()`
`String` `valueClass(String type)` Gets value class name for provided type.
`void` `writeExternal(ObjectOutput out)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### CacheSqlMetadata

    public CacheSqlMetadata()

Required by `Externalizable`.

### Method Detail

#### cacheName

    public String cacheName()

Cache name.

Specified by:
  `cacheName` in interface `GridCacheSqlMetadata`
Returns:
  Cache name.

#### types

    public 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`.

Specified by:
  `types` in interface `GridCacheSqlMetadata`
Returns:
  Collection of available types.

#### keyClass

    public String keyClass(String type)

Gets key class name for provided type.

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

Specified by:
  `keyClass` in interface `GridCacheSqlMetadata`
Parameters:
  `type` - Type name.
Returns:
  Key class name or `null` if type name is unknown.

#### valueClass

    public String valueClass(String type)

Gets value class name for provided type.

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

Specified by:
  `valueClass` in interface `GridCacheSqlMetadata`
Parameters:
  `type` - Type name.
Returns:
  Value class name or `null` if type name is unknown.

#### fields

    public Map<String,String> fields(String type)

Gets fields and their class names for provided type.

Specified by:
  `fields` in interface `GridCacheSqlMetadata`
Parameters:
  `type` - Type name.
Returns:
  Fields map or `null` if type name is unknown.

#### notNullFields

    public Collection<String> notNullFields(String type)

Gets not null fields.

Specified by:
  `notNullFields` in interface `GridCacheSqlMetadata`
Parameters:
  `type` - Type name.
Returns:
  Not null fields collection map or `null` if type name is unknown.

#### keyClasses

    public Map<String,String> keyClasses()

Specified by:
  `keyClasses` in interface `GridCacheSqlMetadata`
Returns:
  Key classes.

#### valClasses

    public Map<String,String> valClasses()

Specified by:
  `valClasses` in interface `GridCacheSqlMetadata`
Returns:
  Value classes.

#### fields

    public Map<String,Map<String,String>> fields()

Specified by:
  `fields` in interface `GridCacheSqlMetadata`
Returns:
  Fields.

#### indexes

    public Map<String,Collection<GridCacheSqlIndexMetadata>> indexes()

Specified by:
  `indexes` in interface `GridCacheSqlMetadata`
Returns:
  Indexes.

#### indexes

    public Collection<GridCacheSqlIndexMetadata> indexes(String type)

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

Specified by:
  `indexes` in interface `GridCacheSqlMetadata`
Parameters:
  `type` - Type name.
Returns:
  Index descriptors.
See Also:
  `GridCacheSqlIndexMetadata`

#### writeExternal

    public void writeExternal(ObjectOutput out)
                       throws IOException

Specified by:
  `writeExternal` in interface `Externalizable`
Throws:
  `IOException`

#### readExternal

    public void readExternal(ObjectInput in)
                      throws IOException,
                             ClassNotFoundException

Specified by:
  `readExternal` in interface `Externalizable`
Throws:
  `IOException`
  `ClassNotFoundException`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.11.0
Release Date | : September 11 2021