⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 aimsbufferresultrecord.java

📁 实例实例实例实例实例实例实例实例实例实例实例实例实例实例实例实例
💻 JAVA
字号:
package com.esri.adf.web.aims.tasks;

import java.util.*;

import javax.faces.event.ActionEvent;

import com.esri.aims.mtier.model.map.layer.query.Records;
import com.esri.aims.mtier.model.map.layer.query.TableDesc;

public class AIMSBufferResultRecord 
{
	private Records records;
	private TableDesc tableDesc;
	private String[] fields;
	private String[] values;
	private HashMap<String, String> map;
	private int id;
	private String recordTag;
	private String recordTagValue;
	
	private String name;
	private Map details;
	
	public Map getDetails() 
	{
		this.details = map;
		return details;
	}

	public void setDetails(Map details) {
		this.details = details;
	}

	public String getName() 
	{
		this.name = this.getRecordTagValue(); 
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public AIMSBufferResultRecord()
	{
	}
	
	public AIMSBufferResultRecord(Records records, TableDesc tableDesc, int id)
	{
		this.records = records;
		this.tableDesc = tableDesc;
		this.id = id;
		
		fields = new String[this.tableDesc.getCount()];
		values = new String[this.records.getCount()];
		map = new HashMap<String, String>();
		
		for(int i=0; i<this.fields.length; i++)
		{
			this.fields[i] = this.tableDesc.getFieldName(i);
		}
		
		for(int i=0; i<this.values.length; i++)
		{
			this.values[i] = this.records.getFieldValue(i);
		}
		
		int minCount = 0;
		if(this.values.length > this.fields.length)
		{
			minCount = this.fields.length;
		}
		else
		{
			minCount = this.values.length;
		}
		
		for(int i=0; i<minCount; i++)
		{
			this.map.put(fields[i], values[i]);
		}
	}
	
	public int getId()
	{
		return this.id;
	}
	
	public void setId(int id)
	{
		this.id = id;
	}
	
	public String[] getFields()
	{
		return this.fields;
	}
	
	public void setFields(String[] fields)
	{
		this.fields = fields;
	}
	
	public String[] getValues()
	{
		return this.values;
	}
	
	public void setValues(String[] values)
	{
		this.values = values;
	}
	
	public String getRecordTag()
	{
		this.recordTag = this.fields[0];
		
		for(int i=0; i<this.fields.length; i++)
		{
			if(this.fields[i].equalsIgnoreCase("NAME") == true)
			{
				this.recordTag = "NAME";
			}
		}
		return this.recordTag;
	}
	
	public void setRecordTag(String recordTag)
	{
		this.recordTag = recordTag;
	}
	
	public String getRecordTagValue()
	{
		this.recordTagValue = this.values[0];
		
		for(int i=0; i<this.fields.length; i++)
		{
			if(this.fields[i].equalsIgnoreCase("NAME") == true)
			{
				this.recordTagValue = this.values[i];
			}
		}
		return this.recordTagValue;
	}
	
	public void setRecordTagValue(String recordTagValue)
	{
		this.recordTagValue = recordTagValue;
	}
	
	public HashMap getMap()
	{
		return this.map;
	}
	
	public void setMap(HashMap<String, String> map)
	{
		this.map = map;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -