gt: 		if (technology != null) {
context: /*******************************************************************************
   * ===========================================================
   * Ankush : Big Data Cluster Management Solution
   * ===========================================================
   * 
   * (C) Copyright 2014, by Impetus Technologies
   * 
   * This is free software; you can redistribute it and/or modify it under
   * the terms of the GNU Lesser General Public License (LGPL v3) as
   * published by the Free Software Foundation;
   * 
   * This software is distributed in the hope that it will be useful, but
   * WITHOUT ANY WARRANTY; without even the implied warranty of
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
   * See the GNU Lesser General Public License for more details.
   * 
   * You should have received a copy of the GNU Lesser General Public License 
   * along with this software; if not, write to the Free Software Foundation, 
   * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
   ******************************************************************************/
  /**
   * 
   */
  package com.impetus.ankush.common.domain;
  
  import java.util.Arrays;
  import java.util.Date;
  import java.util.HashMap;
  import java.util.Map;
  
  import javax.persistence.Column;
  import javax.persistence.Entity;
  import javax.persistence.GeneratedValue;
  import javax.persistence.GenerationType;
  import javax.persistence.Id;
  import javax.persistence.Lob;
  import javax.persistence.NamedQueries;
  import javax.persistence.NamedQuery;
  import javax.persistence.Table;
  import javax.persistence.Transient;
  
  import org.apache.commons.lang.SerializationUtils;
  import org.codehaus.jackson.annotate.JsonIgnore;
  
  import com.impetus.ankush.common.framework.TechnologyData;
  import com.impetus.ankush.common.framework.config.MonitoringInfo;
  
  /**
   * The Class NodeMonitoring.
   * 
   * @author hokam
   */
  @Entity
  @Table(name = "nodemonitoring")
  @NamedQueries({
  		@NamedQuery(name = "getClusterMonitoring", query = "SELECT n FROM NodeMonitoring n,Node nn, Cluster nc WHERE nc.id=:clusterId AND nc.id=nn.clusterId and nn.id=n.nodeId"),
  		@NamedQuery(name = "getNodeMonitoring", query = "SELECT n FROM NodeMonitoring n,Node nn WHERE nn.publicIp=:publicIp AND nn.id=n.nodeId") })
  public class NodeMonitoring extends BaseObject {
  
  	/** The Constant serialVersionUID. */
  	private static final long serialVersionUID = 1L;
  
  	/** The id. */
  	private Long id;
  
  	/** The node id. */
  	private Long nodeId;
  
  	/** The monitoring info bytes. */
  	private byte[] monitoringInfoBytes;
  
  	/** The technology data bytes. */
  	private byte[] technologyDataBytes;
  
  	/** The update time. */
  	private Date updateTime;
  
  	/** Graph View data **/
  	private byte[] graphView;
  
  	/** Technology Service Status **/
  	private byte[] technologyServiceBytes;
  
  	/**
  	 * Gets the id.
  	 * 
  	 * @return the id
  	 */
  	@Id
  	@GeneratedValue(strategy = GenerationType.AUTO)
  	public Long getId() {
  		return id;
  	}
  
  	/**
  	 * Sets the id.
  	 * 
  	 * @param id
  	 *            the id to set
  	 */
  	public void setId(Long id) {
  		this.id = id;
  	}
  
  	/**
  	 * Gets the node id.
  	 * 
  	 * @return the nodeId
  	 */
  	public Long getNodeId() {
  		return nodeId;
  	}
  
  	/**
  	 * Sets the node id.
  	 * 
  	 * @param nodeId
  	 *            the nodeId to set
  	 */
  	public void setNodeId(Long nodeId) {
  		this.nodeId = nodeId;
  	}
  
  	/**
  	 * Sets the monitoring info bytes.
  	 * 
  	 * @param monitoringInfoBytes
  	 *            the monitoringInfoBytes to set
  	 */
  	private void setMonitoringInfoBytes(byte[] monitoringInfoBytes) {
  		this.monitoringInfoBytes = monitoringInfoBytes;
  	}
  
  	/**
  	 * Gets the monitoring info bytes.
  	 * 
  	 * @return the monitoringInfoBytes
  	 */
  	@Lob
  	@Column(length = Integer.MAX_VALUE - 1)
  	private byte[] getMonitoringInfoBytes() {
  		return monitoringInfoBytes;
  	}
  
  	/**
  	 * Gets the monitoring info.
  	 * 
  	 * @return the monitoringInfo
  	 */
  	@Transient
  	public MonitoringInfo getMonitoringInfo() {
  		if (getMonitoringInfoBytes() == null) {
  			return null;
  		}
  		return (MonitoringInfo) SerializationUtils
  				.deserialize(getMonitoringInfoBytes());
  	}
  
  	/**
  	 * Sets the monitoring info.
  	 * 
  	 * @param monitoringInfo
  	 *            the monitoringInfo to set
  	 */
  	public void setMonitoringInfo(MonitoringInfo monitoringInfo) {
  		setMonitoringInfoBytes(SerializationUtils.serialize(monitoringInfo));
  	}
  
  	/**
  	 * Gets the technology service status.
  	 * 
  	 * @return the serviceStatus
  	 */
  	@Transient
  	public Map<String, Map<String, Boolean>> getTechnologyServiceStatus() {
  		// Get technology status bytes if null return null.
  		if (getTechnologyServiceBytes() == null) {
  			return null;
  		}
  		
  		// serializing the data.
  		return (HashMap<String, Map<String, Boolean>>) SerializationUtils
  				.deserialize(getTechnologyServiceBytes());
  	}
  
  	/**
  	 * Sets the service status.
  	 * 
  	 * @param serviceStatus
  	 *            the serviceStatus to set
  	 */
  	public void setTechnologyServiceStatus(
  			HashMap<String, Map<String, Boolean>> serviceStatus) {
  		setTechnologyServiceBytes(SerializationUtils.serialize(serviceStatus));
  	}
  
  	/**
  	 * Method to get Service Status in its raw state i.e. without any check or update.
  	 * 
  	 * @return
  	 */
  	@Transient
  	public HashMap<String, Map<String, Boolean>> getTechnologyGroupedRawServiceStatus() {
  		return getTechnologyGroupedRawServiceStatus(null);
  	}
  	/**
  	 * Method to get Service Status in its raw state i.e. without any check or update.
  	 * 
  	 * @param technology
  	 * @return
  	 */
  	@Transient
  	public HashMap<String, Map<String, Boolean>> getTechnologyGroupedRawServiceStatus(String technology) {
  		HashMap<String, Map<String, Boolean>> techServiceMap = new HashMap<String, Map<String, Boolean>>();
  		HashMap<String, Map<String, Boolean>> serviceMap = new HashMap<String, Map<String, Boolean>>();
  		byte [] techBytes = getTechnologyServiceBytes();
  		if (techBytes == null) {
  			return serviceMap;
  		}
  
  		// deserializing the data.
  		techServiceMap = (HashMap<String, Map<String, Boolean>>) SerializationUtils
  				.deserialize(techBytes);
  
  
  