All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.brijframework.resources.csv.CsvModel Maven / Gradle / Ivy

The newest version!
package org.brijframework.resources.csv;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class CsvModel {
	public Class model;
	public String uniqueKeys;
	public boolean isValidKeys;
	
	public List fields=new ArrayList<>();
	
	private Map csvFieldHash;
	
	private Map mdlFieldHash;
	
	public Map csvFieldHash(){
		if(csvFieldHash!=null && !csvFieldHash.isEmpty()){
			return csvFieldHash;
		}
		Map map=new HashMap<>();
		for(CsvMapper field:fields){
			map.put(field.headerkey, field);
		}
		return map;
	}
	
	public Map mdlFieldHash(){
		if(mdlFieldHash!=null && !mdlFieldHash.isEmpty()){
			return mdlFieldHash;
		}
		Map map=new HashMap<>();
		for(CsvMapper field:fields){
			map.put(field.mappedkey, field);
		}
		return map;
	}
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy