You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by elopez779 <en...@gmail.com> on 2017/09/28 12:37:47 UTC

underscores in Ignite

Dear experts:

I'm developing a Java app that has to create two caches from two simple
tables from Cassandra 2.2.9. The database is not designed by my team, nor
even my enterprise.

The problem is that in one of the tables, one of the fields has an
underscore character (location_info). In the other table is name of the
table (Network_ids). Ignite removes underscores. Is there any suggestion
about how to cache the table?

I'haven't used any kind of importation. The POJO clases are created by me.
The POJO class of the first table, for example, is:

package org.bridging.ignite;

import java.io.Serializable;
import java.util.Map;

public class PojoAccount implements Serializable {
	
	private Map<String, String> location_info;
	private String status;
	
	public PojoAccount() {
		super();
	}
	
	public PojoAccount(Map<String, String> loc_info, String st) {
		this.location_info = loc_info;
		this.status = st;
	}
	
	public Map<String, String> getLocationInfo() { return location_info; }
	public String getStatus() { return status; }
	
	public void setLocationInfo(Map<String, String> loc_info) { location_info =
loc_info; }
	public void setStatus(String st) { status = st; }
	
	public String toString() {
		return status + " ; " + location_info.toString();
	}
}

Thanks in advance.

Enrique








--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: underscores in Ignite

Posted by Nikolai Tikhonov <nt...@apache.org>.
Hi,

As I know that integration with cassandra allows to set custom mapping.
You can find example in doc (Example 5):
https://apacheignite-mix.readme.io/docs/examples#section-example-5

On Thu, Sep 28, 2017 at 3:37 PM, elopez779 <en...@gmail.com>
wrote:

> Dear experts:
>
> I'm developing a Java app that has to create two caches from two simple
> tables from Cassandra 2.2.9. The database is not designed by my team, nor
> even my enterprise.
>
> The problem is that in one of the tables, one of the fields has an
> underscore character (location_info). In the other table is name of the
> table (Network_ids). Ignite removes underscores. Is there any suggestion
> about how to cache the table?
>
> I'haven't used any kind of importation. The POJO clases are created by me.
> The POJO class of the first table, for example, is:
>
> package org.bridging.ignite;
>
> import java.io.Serializable;
> import java.util.Map;
>
> public class PojoAccount implements Serializable {
>
>         private Map<String, String> location_info;
>         private String status;
>
>         public PojoAccount() {
>                 super();
>         }
>
>         public PojoAccount(Map<String, String> loc_info, String st) {
>                 this.location_info = loc_info;
>                 this.status = st;
>         }
>
>         public Map<String, String> getLocationInfo() { return
> location_info; }
>         public String getStatus() { return status; }
>
>         public void setLocationInfo(Map<String, String> loc_info) {
> location_info =
> loc_info; }
>         public void setStatus(String st) { status = st; }
>
>         public String toString() {
>                 return status + " ; " + location_info.toString();
>         }
> }
>
> Thanks in advance.
>
> Enrique
>
>
>
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>