// Path: neo4j-json/src/main/java/org/neo4j/helpers/json/document/DocumentId.java
// public interface DocumentId {
// 
// 	/**
// 	 * Key is the attribute's name
// 	 * Value is the attribute's value
// 	 * that compose the identify
// 	 * @return
// 	 */
// 	Map<String, String> getFields();
// 	
// 	/**
// 	 * Buil a cypher filter condition
// 	 * ES: filed1: 'aaa', field2: 'bbb'
// 	 * @return
// 	 */
// 	String toCypherFilter();
// 	
// 	/**
// 	 * Equals and hashCode must be implemented
// 	 */
// }
// 
// Path: neo4j-json/src/main/java/org/neo4j/helpers/json/document/utils/IdValueTypeSafe.java
// public class IdValueTypeSafe {
// 
// 	private Object value;
// 
// 	/**
// 	 * Wrap the real value
// 	 * @param value
// 	 */
// 	public IdValueTypeSafe(Object value) {
// 		if(value == null)
// 		{
// 			throw new IllegalArgumentException("value cannot be null");
// 		}
// 		this.value = value;
// 	}
// 	
// 	/**
// 	 * return a filter value according with type of real value
// 	 * @return
// 	 */
// 	public String toCypher(){
// 		if(isString())
// 		{
// 			return "'"+toString().replaceAll("'", "\\\\'")+"'";
// 		}
// 		return toString();
// 	}
// 	
// 	public boolean isString(){
// 		return (value instanceof String);
// 	}
// 	
// 	public boolean isNumber(){
// 		return !isString();
// 	}
// 	
// 	/**
// 	 * get the original value
// 	 * @return
// 	 */
// 	public Object getValue(){
// 		return this.value;
// 	}
// 
// 	@Override
// 	public String toString() {
// 		return value.toString();
// 	}
// 	
// }


import org.neo4j.helpers.json.document.DocumentId;
import org.neo4j.helpers.json.document.utils.IdValueTypeSafe;
import java.util.HashMap;
import java.util.Map;
/**
 * Copyright (c) 2017 LARUS Business Automation [http://www.larus-ba.it]
 * <p>
 * This file is part of the "LARUS Integration Framework for Neo4j".
 * <p>
 * The "LARUS Integration Framework for Neo4j" is licensed
 * under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.neo4j.helpers.json.document.impl;



/**
 * DocumentId composed of "type" and "id"
 * @author Omar Rampado
 *
 */
public class DocumentIdTypeId implements DocumentId {

	public static final String ID = "id";
	public static final String TYPE = "type";
	
	
// Path: neo4j-json/src/main/java/org/neo4j/helpers/json/document/DocumentId.java
// public interface DocumentId {
// 
// 	/**
// 	 * Key is the attribute's name
// 	 * Value is the attribute's value
// 	 * that compose the identify
// 	 * @return
// 	 */
// 	Map<String, String> getFields();
// 	
// 	/**
// 	 * Buil a cypher filter condition
// 	 * ES: filed1: 'aaa', field2: 'bbb'
// 	 * @return
// 	 */
// 	String toCypherFilter();
// 	
// 	/**
// 	 * Equals and hashCode must be implemented
// 	 */
// }
// 
// Path: neo4j-json/src/main/java/org/neo4j/helpers/json/document/utils/IdValueTypeSafe.java
// public class IdValueTypeSafe {
// 
// 	private Object value;
// 
// 	/**
// 	 * Wrap the real value
// 	 * @param value
// 	 */
// 	public IdValueTypeSafe(Object value) {
// 		if(value == null)
// 		{
// 			throw new IllegalArgumentException("value cannot be null");
// 		}
// 		this.value = value;
// 	}
// 	
// 	/**
// 	 * return a filter value according with type of real value
// 	 * @return
// 	 */
// 	public String toCypher(){
// 		if(isString())
// 		{
// 			return "'"+toString().replaceAll("'", "\\\\'")+"'";
// 		}
// 		return toString();
// 	}
// 	
// 	public boolean isString(){
// 		return (value instanceof String);
// 	}
// 	
// 	public boolean isNumber(){
// 		return !isString();
// 	}
// 	
// 	/**
// 	 * get the original value
// 	 * @return
// 	 */
// 	public Object getValue(){
// 		return this.value;
// 	}
// 
// 	@Override
// 	public String toString() {
// 		return value.toString();
// 	}
// 	
// }


// Path: neo4j-json/src/main/java/org/neo4j/helpers/json/document/impl/DocumentIdTypeId.java
import org.neo4j.helpers.json.document.DocumentId;
import org.neo4j.helpers.json.document.utils.IdValueTypeSafe;
import java.util.HashMap;
import java.util.Map;

/**
 * Copyright (c) 2017 LARUS Business Automation [http://www.larus-ba.it]
 * <p>
 * This file is part of the "LARUS Integration Framework for Neo4j".
 * <p>
 * The "LARUS Integration Framework for Neo4j" is licensed
 * under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.neo4j.helpers.json.document.impl;



/**
 * DocumentId composed of "type" and "id"
 * @author Omar Rampado
 *
 */
public class DocumentIdTypeId implements DocumentId {

	public static final String ID = "id";
	public static final String TYPE = "type";
	
	
	private IdValueTypeSafe id;