Skip to content

Commit

Permalink
# IGNITE-32 GridCacheQueryTypeMetadata -> CacheTypeMetadata.
Browse files Browse the repository at this point in the history
  • Loading branch information
akuznetsov-gridgain committed Feb 4, 2015
1 parent 9b132b7 commit bff48f9
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 257 deletions.
6 changes: 3 additions & 3 deletions modules/clients/src/test/resources/spring-server-node.xml
Expand Up @@ -156,7 +156,7 @@
<bean class="org.apache.ignite.cache.query.CacheQueryConfiguration">
<property name="typeMetadata">
<list>
<bean class="org.apache.ignite.cache.query.CacheQueryTypeMetadata">
<bean class="org.apache.ignite.cache.CacheTypeMetadata">
<property name="type" value="GridPortablePerson"/>
<property name="ascendingFields">
<map>
Expand All @@ -174,7 +174,7 @@
</list>
</property>
</bean>
<bean class="org.apache.ignite.cache.query.CacheQueryTypeMetadata">
<bean class="org.apache.ignite.cache.CacheTypeMetadata">
<property name="type" value="GridImplicitPortablePerson"/>
<property name="ascendingFields">
<map>
Expand All @@ -187,7 +187,7 @@
</map>
</property>
</bean>
<bean class="org.apache.ignite.cache.query.CacheQueryTypeMetadata">
<bean class="org.apache.ignite.cache.CacheTypeMetadata">
<property name="type" value="GridNoDefPortablePerson"/>
<property name="ascendingFields">
<map>
Expand Down
6 changes: 3 additions & 3 deletions modules/clients/src/test/resources/spring-server-ssl-node.xml
Expand Up @@ -140,7 +140,7 @@
<bean class="org.apache.ignite.cache.query.CacheQueryConfiguration">
<property name="typeMetadata">
<list>
<bean class="org.apache.ignite.cache.query.CacheQueryTypeMetadata">
<bean class="org.apache.ignite.cache.CacheTypeMetadata">
<property name="type" value="GridPortablePerson"/>
<property name="ascendingFields">
<map>
Expand All @@ -158,7 +158,7 @@
</list>
</property>
</bean>
<bean class="org.apache.ignite.cache.query.CacheQueryTypeMetadata">
<bean class="org.apache.ignite.cache.CacheTypeMetadata">
<property name="type" value="GridImplicitPortablePerson"/>
<property name="ascendingFields">
<map>
Expand All @@ -171,7 +171,7 @@
</map>
</property>
</bean>
<bean class="org.apache.ignite.cache.query.CacheQueryTypeMetadata">
<bean class="org.apache.ignite.cache.CacheTypeMetadata">
<property name="type" value="GridNoDefPortablePerson"/>
<property name="ascendingFields">
<map>
Expand Down
Expand Up @@ -254,7 +254,7 @@
* or for a specific type via {@link org.apache.ignite.portables.PortableTypeConfiguration} instance.
* <h1 class="header">Query Indexing</h1>
* Portable objects can be indexed for querying by specifying index fields in
* {@link org.apache.ignite.cache.query.CacheQueryTypeMetadata} inside of specific {@link CacheConfiguration} instance,
* {@link org.apache.ignite.cache.CacheTypeMetadata} inside of specific {@link CacheConfiguration} instance,
* like so:
* <pre name=code class=xml>
* ...
Expand All @@ -264,7 +264,7 @@
* &lt;bean class="CacheQueryConfiguration"&gt;
* &lt;property name="typeMetadata"&gt;
* &lt;list&gt;
* &lt;bean class="CacheQueryTypeMetadata"&gt;
* &lt;bean class="CacheTypeMetadata"&gt;
* &lt;property name="type" value="Employee"/&gt;
*
* &lt;!-- Fields to index in ascending order. --&gt;
Expand Down
Expand Up @@ -18,7 +18,6 @@
package org.apache.ignite.cache.query;

import java.io.*;
import java.util.*;

/**
* Query configuration object.
Expand All @@ -27,9 +26,6 @@ public class CacheQueryConfiguration implements Serializable {
/** */
private static final long serialVersionUID = 0L;

/** Collection of query type metadata. */
private Collection<CacheQueryTypeMetadata> typeMeta;

/** Query type resolver. */
private CacheQueryTypeResolver typeRslvr;

Expand All @@ -56,32 +52,13 @@ public CacheQueryConfiguration() {
* @param cfg Configuration to copy.
*/
public CacheQueryConfiguration(CacheQueryConfiguration cfg) {
typeMeta = cfg.getTypeMetadata();
typeRslvr = cfg.getTypeResolver();
idxPrimitiveKey = cfg.isIndexPrimitiveKey();
idxPrimitiveVal = cfg.isIndexPrimitiveValue();
idxFixedTyping = cfg.isIndexFixedTyping();
escapeAll = cfg.isEscapeAll();
}

/**
* Gets collection of query type metadata objects.
*
* @return Collection of query type metadata.
*/
public Collection<CacheQueryTypeMetadata> getTypeMetadata() {
return typeMeta;
}

/**
* Sets collection of query type metadata objects.
*
* @param typeMeta Collection of query type metadata.
*/
public void setTypeMetadata(Collection<CacheQueryTypeMetadata> typeMeta) {
this.typeMeta = typeMeta;
}

/**
* Gets query type resolver.
*
Expand Down

This file was deleted.

Expand Up @@ -437,8 +437,8 @@ private EntryMapping entryMapping(Object keyTypeId, Object key) throws CacheExce
EntryMapping em = cacheMappings(cacheName).get(keyTypeId);

if (em == null)
throw new CacheException("Failed to find mapping description [table = " + em.fullTableName() +
", key=" + key + ", cache=" + (cacheName != null ? cacheName : "<default>") + "]");
throw new CacheException("Failed to find mapping description [key=" + key +
", cache=" + (cacheName != null ? cacheName : "<default>") + "]");

return em;
}
Expand Down

0 comments on commit bff48f9

Please sign in to comment.