Ver Fonte

first commit

jacob kim há 7 meses atrás
commit
bf137159d0

+ 35 - 0
.gitignore

@@ -0,0 +1,35 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store

+ 35 - 0
pom.xml

@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+		 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+		 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+	<groupId>com.fourj</groupId>
+	<artifactId>foframework-web-parameter</artifactId>
+	<version>1.0-RELEASE</version>
+	<packaging>jar</packaging>
+
+	<name>com.fourj.foframework.web.parameter</name>
+	<url>https://maven.apache.org</url>
+
+	<!-- Spring Boot 3.5 + Java 21 -->
+	<parent>
+		<groupId>org.springframework.boot</groupId>
+		<artifactId>spring-boot-starter-parent</artifactId>
+		<version>3.5.6</version>
+		<relativePath/>
+	</parent>
+
+	<properties>
+		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+		<java.version>21</java.version>
+	</properties>
+
+	<dependencies>
+		<!-- Spring Boot Web Starter: 이미 jakarta.servlet 포함 -->
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-web</artifactId>
+		</dependency>
+	</dependencies>
+</project>

+ 241 - 0
src/main/java/com/fourj/foframework/web/parameter/FoMap.java

@@ -0,0 +1,241 @@
+package com.fourj.foframework.web.parameter;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Hash table and linked list implementation of the Map interface,
+ * with predictable iteration order.
+ * This replaces FoMap.
+ * 
+ * @author fourj1315
+ * @since 2024. 07. 04
+ */
+public class FoMap extends LinkedHashMap<Object, Object> implements Serializable {
+	private static final long serialVersionUID = 4686410411375373904L;
+
+	@SuppressWarnings("unused")
+	private String name;
+
+	public FoMap() {
+	}
+
+	public FoMap(String name) {
+		this();
+		this.name = name;
+	}
+
+	public Object get(Object key) {
+		Object obj = super.get(key);
+
+		if (obj == null)
+			return "";
+		else
+			return obj;
+	}
+
+	public void set(Object key, Object value) {
+		super.put(key, value);
+	}
+
+	public BigDecimal getBigDecimal(Object key) {
+		Object obj = super.get(key);
+
+		if (obj == null)
+			return new BigDecimal(0.0D);
+		else
+			return (BigDecimal)obj;
+	}
+
+	public void setBigDecimal(Object key, BigDecimal value) {
+		this.set(key, value);
+	}
+
+	public boolean getBoolean(Object key) {
+		Object obj = super.get(key);
+		if (obj == null)
+			return false;
+
+		Class<? extends Object> classType = obj.getClass();
+		if (classType == java.lang.Boolean.class) return ((Boolean)obj).booleanValue();
+		if (classType == java.lang.String.class) return Boolean.parseBoolean(obj.toString());
+
+		return false;
+	}
+
+	public void setBoolean(Object key, boolean value) {
+		Boolean bool = new Boolean(value);
+		this.set(key, bool);
+	}
+
+	public double getDouble(Object key) {
+		Object obj = super.get(key);
+		if (obj == null) {
+			return 0.0D;
+		}
+
+		Class<? extends Object> classType = obj.getClass();
+		if (classType == java.lang.Double.class) return ((Double)obj).doubleValue();
+		if (classType == java.lang.Float.class) return (double)((Float)obj).floatValue();
+		if (classType == java.lang.String.class || classType == java.math.BigDecimal.class) {
+			try {
+				return Double.parseDouble(obj.toString());
+			} catch (NumberFormatException nfe) {
+				System.out.println("FoMap key(" + key + ")" + "'s type(double) does not match : It's type is not double.");
+			}
+		}
+
+		System.out.println("FoMap value's type(double) does not match : It's type is not double.");
+
+		return 0.0D;
+	}
+
+	public void setDouble(Object key, double value) {
+		Double dou = new Double(value);
+		this.set(key, dou);
+	}
+
+	public float getFloat(Object key) {
+		Object obj = super.get(key);
+		if (obj == null) {
+			return 0.0F;
+		}
+
+		Class<? extends Object> classType = obj.getClass();
+		if (classType == java.lang.Float.class) return ((Float)obj).floatValue();
+		if (classType == java.lang.String.class || classType == java.math.BigDecimal.class) {
+			try {
+				return Float.parseFloat(obj.toString());
+			} catch (NumberFormatException e) {
+				System.out.println("FoMap key(" + key + ")'s type(float) does not match : It's type is not float.");
+			}
+		}
+
+		System.out.println("FoMap value's type(float) does not match : It's type is not float.");
+
+		return 0.0F;
+	}
+
+	public void setFloat(Object key, float value) {
+		Float flo = new Float(value);
+		this.set(key, flo);
+	}
+
+	public int getInt(Object key) {
+		Object obj = super.get(key);
+		if (obj == null)
+			return 0;
+
+		Class<? extends Object> classType = obj.getClass();
+
+		if (classType == java.lang.Integer.class || classType == java.math.BigInteger.class)
+			return ((Integer)obj).intValue();
+		if (classType == java.lang.Short.class) return ((Short)obj).shortValue();
+		if (classType == java.lang.String.class || classType == java.math.BigDecimal.class) {
+			try {
+				return Integer.parseInt(obj.toString());
+			} catch (NumberFormatException nfe) {
+				System.out.println("FoMap key(" + key + ")" + "'s type(int) does not match : It's type is not double.");
+			}
+		}
+
+		System.out.println("FoMap value's type(int) does not match : It's type is not int.");
+
+		return 0;
+	}
+
+	public void setInt(Object key, int value) {
+		Integer integer = new Integer(value);
+		this.set(key, integer);
+	}
+
+	public long getLong(Object key) {
+		Object obj = super.get(key);
+		if (obj == null) {
+			return 0L;
+		}
+
+		Class<? extends Object> classType = obj.getClass();
+		if (classType == java.lang.Long.class) return ((Long)obj).longValue();
+		if (classType == java.lang.Integer.class) return (long)((Integer)obj).intValue();
+		if (classType == java.lang.Short.class) return (long)((Short)obj).shortValue();
+		if (classType == java.lang.String.class || classType == java.math.BigDecimal.class) {
+			try {
+				return Long.parseLong(obj.toString());
+			} catch (NumberFormatException e) {
+				System.out.println("FoMap key(" + key + ")'s type(long) does not match : It's type is not long.");
+			}
+		}
+
+		System.out.println("FoMap value's type(long) does not match : It's type is not float.");
+
+		return 0L;
+	}
+
+	public void setLong(Object key, long value) {
+		Long lon = new Long(value);
+		this.set(key, lon);
+	}
+
+	@Deprecated
+	public Object getObject(Object key) {
+		return super.get(key);
+	}
+
+	public short getShort(Object key) {
+		Object obj = super.get(key);
+		if (obj == null) {
+			return 0;
+		}
+
+		Class<? extends Object> classType = obj.getClass();
+		if (classType == java.lang.Short.class) return ((Short)obj).shortValue();
+		if (classType == java.lang.String.class || classType == java.math.BigDecimal.class) {
+			try {
+				return Short.parseShort(obj.toString());
+			} catch (NumberFormatException e) {
+				System.out.println("FoMap key(" + key + ")'s type(short) does not match : It's type is not long.");
+			}
+		}
+
+		System.out.println("FoMap value's type(short) does not match : It's type is not long.");
+
+		return 0;
+	}
+
+	public void setShort(Object key, short value) {
+		Short shor = new Short(value);
+		this.set(key, shor);
+	}
+
+	public String getString(Object key) {
+		Object obj = super.get(key);
+		if (obj == null)
+			return "";
+
+		//		if (obj instanceof BigDecimal) {
+		//			return ((BigDecimal) obj).toPlainString();
+		//		}
+
+		return obj.toString();
+	}
+
+	public void setString(Object key, String value) {
+		this.set(key, value);
+	}
+
+	public Object getKeyWithIndex() {
+		Set<Map.Entry<Object, Object>> set = entrySet();
+		Object obj = null;
+		Iterator<Map.Entry<Object, Object>> itr = set.iterator();
+		for (int i = 0; i <= set.size(); ++i) {
+			Map.Entry<Object, Object> entry = itr.next();
+			obj = entry.getKey();
+		}
+		return obj;
+	}
+}

+ 432 - 0
src/main/java/com/fourj/foframework/web/parameter/FoMapList.java

@@ -0,0 +1,432 @@
+package com.fourj.foframework.web.parameter;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.*;
+
+/**
+ * Hash table and linked list implementation of the Map interface,
+ * with predictable iteration order.
+ * This replaces FoMapList.
+ * 
+ * @author fourj1315
+ * @since 2024. 07. 04
+ */
+public class FoMapList extends LinkedHashMap<Object, Object> implements Serializable {
+	private static final long serialVersionUID = 496702765517420534L;
+
+	private int fieldIndex;
+	private HashMap<String, Integer> entityKey;
+	private String name;
+
+	public FoMapList() {
+		fieldIndex = 0;
+		entityKey = null;
+	}
+
+	public FoMapList(String name) {
+		fieldIndex = 0;
+		entityKey = null;
+		this.name = name;
+	}
+
+	public FoMapList(int initialCapacity, float loadFactor) {
+		super(initialCapacity, loadFactor);
+		fieldIndex = 0;
+		entityKey = null;
+	}
+
+	public FoMapList(int initialCapacity) {
+		super(initialCapacity);
+		fieldIndex = 0;
+		entityKey = null;
+	}
+
+	public FoMapList(Map<?, ?> m) {
+		super(m);
+		fieldIndex = 0;
+		entityKey = null;
+	}
+
+	@SuppressWarnings("unchecked")
+	public void add(Object key, Object value) {
+		if (!super.containsKey(key)) {
+			List<Object> arrayList = new ArrayList<Object>();
+			arrayList.add(value);
+			super.put(key, arrayList);
+		} else {
+			List<Object> arrayList = (ArrayList<Object>)super.get(key);
+			arrayList.add(value);
+		}
+	}
+
+	@SuppressWarnings("unchecked")
+	public void addString(Object key, String value) {
+		if (!super.containsKey(key)) {
+			List<String> arrayList = new ArrayList<String>();
+			arrayList.add(value);
+			super.put(key, arrayList);
+		} else {
+			List<String> arrayList = (ArrayList<String>)super.get(key);
+			arrayList.add(value);
+		}
+	}
+
+	@SuppressWarnings("unchecked")
+	public void addInt(Object key, int value) {
+		Integer valueInt = new Integer(value);
+
+		if (!super.containsKey(key)) {
+			List<Integer> arrayList = new ArrayList<Integer>();
+			arrayList.add(valueInt);
+			super.put(key, arrayList);
+		} else {
+			List<Integer> arrayList = (ArrayList<Integer>)super.get(key);
+			arrayList.add(valueInt);
+		}
+	}
+
+	@SuppressWarnings("unchecked")
+	public void addDouble(Object key, double value) {
+		Double valueDouble = new Double(value);
+
+		if (!super.containsKey(key)) {
+			List<Double> arrayList = new ArrayList<Double>();
+			arrayList.add(valueDouble);
+			super.put(key, arrayList);
+		} else {
+			List<Double> arrayList = (ArrayList<Double>)super.get(key);
+			arrayList.add(valueDouble);
+		}
+	}
+
+	@SuppressWarnings("unchecked")
+	public void addFloat(Object key, float value) {
+		Float valueFloat = new Float(value);
+
+		if (!super.containsKey(key)) {
+			List<Float> arrayList = new ArrayList<Float>();
+			arrayList.add(valueFloat);
+			super.put(key, arrayList);
+		} else {
+			List<Float> arrayList = (ArrayList<Float>)super.get(key);
+			arrayList.add(valueFloat);
+		}
+	}
+
+	@SuppressWarnings("unchecked")
+	public void addLong(Object key, long value) {
+		Long valueLong = new Long(value);
+
+		if (!super.containsKey(key)) {
+			List<Long> arrayList = new ArrayList<Long>();
+			arrayList.add(valueLong);
+			super.put(key, arrayList);
+		} else {
+			List<Long> arrayList = (ArrayList<Long>)super.get(key);
+			arrayList.add(valueLong);
+		}
+	}
+
+	@SuppressWarnings("unchecked")
+	public void addShort(Object key, short value) {
+		Short valueShort = new Short(value);
+
+		if (!super.containsKey(key)) {
+			List<Short> arrayList = new ArrayList<Short>();
+			arrayList.add(valueShort);
+			super.put(key, arrayList);
+		} else {
+			List<Short> arrayList = (ArrayList<Short>)super.get(key);
+			arrayList.add(valueShort);
+		}
+	}
+
+	@SuppressWarnings("unchecked")
+	public void addBoolean(Object key, boolean value) {
+		Boolean valueBoolean = new Boolean(value);
+
+		if (!super.containsKey(key)) {
+			List<Boolean> arrayList = new ArrayList<Boolean>();
+			arrayList.add(valueBoolean);
+			super.put(key, arrayList);
+		} else {
+			List<Boolean> arrayList = (ArrayList<Boolean>)super.get(key);
+			arrayList.add(valueBoolean);
+		}
+	}
+
+	@SuppressWarnings("unchecked")
+	public void addBigDecimal(Object key, BigDecimal value) {
+		if (!super.containsKey(key)) {
+			List<BigDecimal> arrayList = new ArrayList<BigDecimal>();
+			arrayList.add(value);
+			super.put(key, arrayList);
+		} else {
+			List<BigDecimal> arrayList = (ArrayList<BigDecimal>)super.get(key);
+			arrayList.add(value);
+		}
+	}
+
+	public void addFoMap(FoMap map) {
+		Set<?> tempSet = map.keySet();
+
+		for (Iterator<?> iterator = tempSet.iterator(); iterator.hasNext();) {
+			Object key = iterator.next();
+
+			if (containsKey(key)) {
+				int field_size = ((ArrayList<?>)get(key)).size();
+				if (field_size != fieldIndex) {
+					for (int inx = field_size; inx < fieldIndex; inx++) {
+						add(key, null);
+					}
+				}
+				add(key, map.get(key));
+			} else {
+				for (int inx = 0; inx < fieldIndex; inx++) {
+					add(key, null);
+				}
+				add(key, map.get(key));
+			}
+		}
+
+		fieldIndex++;
+	}
+
+	public void addFoMap(String dataName, FoMap map) {
+		int entitySize = 0;
+
+		if (entityKey == null) {
+			entityKey = new HashMap<String, Integer>(5);
+		} else {
+			if (entityKey.containsKey(dataName)) {
+				entitySize = ((Integer)entityKey.get(dataName)).intValue();
+			}
+		}
+
+		Set<?> tempSet = map.keySet();
+		for (Iterator<?> iterator = tempSet.iterator(); iterator.hasNext();) {
+			Object key = iterator.next();
+			String dataKey = dataName + "." + key;
+			if (containsKey(dataKey)) {
+				int fieldSize = ((ArrayList<?>)get(dataKey)).size();
+				if (fieldSize != entitySize) {
+					for (int inx = fieldSize; inx < entitySize; inx++) {
+						add(dataKey, null);
+					}
+				}
+				add(dataKey, map.get(key));
+			} else {
+				for (int inx = 0; inx < entitySize; inx++) {
+					add(dataKey, null);
+				}
+				add(dataKey, map.get(key));
+			}
+		}
+
+		entityKey.put(dataName, new Integer(entitySize + 1));
+	}
+
+	public Object get(Object key, int index) {
+		return getObject(key, index);
+	}
+
+	public BigDecimal getBigDecimal(Object key, int index) {
+		Object obj = getObject(key, index);
+
+		if (obj == null)
+			return new BigDecimal(0.0D);
+		else
+			return (BigDecimal)obj;
+	}
+
+	public boolean getBoolean(Object key, int index) {
+		Object obj = getObject(key, index);
+
+		if (obj == null) return false;
+
+		Class<? extends Object> classType = obj.getClass();
+		if (classType == java.lang.Boolean.class) return ((Boolean)obj).booleanValue();
+		if (classType == java.lang.String.class) return Boolean.parseBoolean(obj.toString());
+
+		return false;
+	}
+
+	public double getDouble(Object key, int index) {
+		Object obj = getObject(key, index);
+
+		if (obj == null) return 0.0D;
+
+		Class<? extends Object> classType = obj.getClass();
+		if (classType == java.lang.Double.class) return ((Double)obj).doubleValue();
+		if (classType == java.lang.Float.class) return (double)((Float)obj).floatValue();
+		if (classType == java.lang.String.class || classType == java.math.BigDecimal.class) {
+			try {
+				return Double.parseDouble(obj.toString());
+			} catch (NumberFormatException nfe) {
+				System.out.println("FoMapList value of the key(" + key + ") type(double) does not match : It's type is not double");
+			}
+		}
+
+		return 0.0D;
+	}
+
+	public float getFloat(Object key, int index) {
+		Object obj = getObject(key, index);
+
+		if (obj == null) return 0.0F;
+
+		Class<? extends Object> classType = obj.getClass();
+		if (classType == java.lang.Float.class) return ((Float)obj).floatValue();
+		if (classType == java.lang.String.class || classType == java.math.BigDecimal.class) {
+			try {
+				return Float.parseFloat(obj.toString());
+			} catch (NumberFormatException nfe) {
+				System.out.println("FoMapList value of the key(" + key + ") type(float) does not match : It's type is not float");
+			}
+		}
+
+		return 0.0F;
+	}
+
+	public int getInt(Object key, int index) {
+		Object obj = getObject(key, index);
+
+		if (obj == null) return 0;
+
+		Class<? extends Object> classType = obj.getClass();
+		if (classType == java.lang.Integer.class) return ((Integer)obj).intValue();
+		if (classType == java.lang.Short.class) return ((Short)obj).shortValue();
+		if (classType == java.lang.String.class || classType == java.math.BigDecimal.class) {
+			try {
+				return Integer.parseInt(obj.toString());
+			} catch (NumberFormatException nfe) {
+				System.out.println("FoMapList value of the key(" + key + ") type(int) does not match : It's type is not int");
+			}
+		}
+
+		return 0;
+	}
+
+	public long getLong(Object key, int index) {
+		Object obj = getObject(key, index);
+
+		if (obj == null) return 0L;
+
+		Class<? extends Object> classType = obj.getClass();
+		if (classType == java.lang.Long.class) return ((Long)obj).longValue();
+		if (classType == java.lang.Integer.class) return (long)((Integer)obj).intValue();
+		if (classType == java.lang.Short.class) return (long)((Short)obj).shortValue();
+		if (classType == java.lang.String.class || classType == java.math.BigDecimal.class) {
+			try {
+				return Long.parseLong(obj.toString());
+			} catch (NumberFormatException nfe) {
+				System.out.println("FoMapList value of the key(" + key + ") type(long) does not match : It's type is not long");
+			}
+		}
+
+		return 0L;
+	}
+
+	public FoMap getFoMap(int index) {
+		FoMap map = new FoMap();
+		Set<?> tempSet = super.keySet();
+		String key;
+		Object obj;
+
+		for (Iterator<?> iterator = tempSet.iterator(); iterator.hasNext(); map.put(key, obj)) {
+			key = iterator.next().toString();
+			obj = getObject(key, index);
+		}
+
+		return map;
+	}
+
+	public FoMap getFoMap(String dataName, int index) {
+		FoMap map = new FoMap(dataName);
+		String prefix = dataName + ".";
+		Set<?> tempSet = super.keySet();
+
+		for (Iterator<?> iterator = tempSet.iterator(); iterator.hasNext();) {
+			String key = iterator.next().toString();
+			int key_index = key.indexOf(".");
+			String realKey = key.substring(key_index + 1);
+			if (key.startsWith(prefix)) {
+				Object obj = getObject(key, index);
+				map.put(realKey, obj);
+			}
+		}
+
+		return map;
+	}
+
+	private Object getObject(Object key, int index) {
+		Object obj = null;
+		List<?> arrayList = (ArrayList<?>)super.get(key);
+
+		if (arrayList == null) return null;
+
+		try {
+			if (index >= arrayList.size()) return null;
+			obj = arrayList.get(index);
+		} catch (IndexOutOfBoundsException iobe) {
+			System.out.println("FoMapList index(" + index + ") in FoMapList(" + name + ") is out of Bounds.");
+		}
+
+		return obj;
+	}
+
+	public short getShort(Object key, int index) {
+		Object obj = getObject(key, index);
+
+		if (obj == null) return 0;
+
+		Class<? extends Object> classType = obj.getClass();
+		if (classType == java.lang.Short.class) return ((Short)obj).shortValue();
+		if (classType == java.lang.String.class || classType == java.math.BigDecimal.class) {
+			try {
+				return Short.parseShort(obj.toString());
+			} catch (NumberFormatException nfe) {
+				System.out.println("FoMapList value of key(" + key + ")" + " type(short) does not match : It's type is not short");
+			}
+		}
+
+		return 0;
+	}
+
+	public String getString(Object key, int index) {
+		Object obj = getObject(key, index);
+		if (obj == null) {
+			return "";
+		} else {
+			return obj.toString();
+		}
+	}
+
+	public int keySize(Object key) {
+		if (super.containsKey(key)) {
+			return ((ArrayList<?>)super.get(key)).size();
+		} else {
+			return 0;
+		}
+	}
+
+	public Object remove(Object key, int index) {
+		if (super.containsKey(key)) {
+			return ((ArrayList<?>)super.get(key)).remove(index);
+		} else {
+			return null;
+		}
+	}
+
+	public int size() {
+		Set<?> tempSet = super.keySet();
+		Iterator<?> iterator = tempSet.iterator();
+		if (iterator.hasNext()) {
+			String key = iterator.next().toString();
+			return ((ArrayList<?>)super.get(key)).size();
+		} else {
+			return 0;
+		}
+	}
+}

+ 100 - 0
src/main/java/com/fourj/foframework/web/parameter/FoMapMeta.java

@@ -0,0 +1,100 @@
+package com.fourj.foframework.web.parameter;
+
+import java.io.Serializable;
+import java.util.LinkedHashMap;
+
+public class FoMapMeta extends LinkedHashMap<Object, Object> {
+	private static final long serialVersionUID = 8647081260461931894L;
+
+	public FoMapMeta() {
+
+	}
+
+	public int getType(String key) {
+		MetaData metaData = (MetaData) super.get(key);
+		return metaData.getType();
+	}
+
+	public void setType(String paramString, int type) {
+		Object obj = super.get(paramString);
+		MetaData metaData = null;
+		if (obj == null) {
+			metaData = new MetaData(type, 0);
+			super.put(paramString, metaData);
+		} else {
+			metaData = (MetaData) obj;
+		}
+		metaData.setType(type);
+	}
+
+	public int getSize(String key) {
+		MetaData metaData = (MetaData) super.get(key);
+		return metaData.getSize();
+	}
+
+	public void setSize(String paramString, int size) {
+		Object obj = get(paramString);
+		MetaData metaData = null;
+		if (obj == null) {
+			metaData = new MetaData(0, size);
+			super.put(paramString, metaData);
+		} else {
+			metaData = (MetaData) obj;
+		}
+		metaData.setSize(size);
+	}
+
+	class MetaData implements Serializable {
+		private static final long serialVersionUID = -5987461527368970855L;
+
+		private int type;
+		private int size;
+
+		MetaData(int type, int size) {
+			this.type = type;
+			this.size = size;
+		}
+
+		MetaData(String paramString) {
+			setMetaInfo(paramString);
+		}
+
+		public void setMetaInfo(String paramString) {
+			String[] arrayOfString = paramString.split("\\|");
+			if ((arrayOfString == null) || (arrayOfString.length != 2)) {
+				System.out.println("Meta String: " + paramString);
+			} else {
+				try {
+					setType(Integer.parseInt(arrayOfString[0]));
+					setSize(Integer.parseInt(arrayOfString[1]));
+				} catch (NumberFormatException nfe) {
+					System.out.println("Meta String: " + paramString);
+				}
+			}
+		}
+
+		public String getMetaInfo() {
+			return getType() + "|" + getSize();
+		}
+
+		public int getType() {
+			return type;
+		}
+
+		public void setType(int type) {
+			this.type = type;
+		}
+
+		public int getSize() {
+			return size;
+		}
+
+		public void setSize(int size) {
+			if (size < 0) {
+				System.out.println("Size: " + size);
+			}
+
+			this.size = size;
+		}
+	}
+}

+ 62 - 0
src/main/java/com/fourj/foframework/web/parameter/FoParameterUtil.java

@@ -0,0 +1,62 @@
+package com.fourj.foframework.web.parameter;
+
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.List;
+
+import jakarta.servlet.http.HttpServletRequest;
+
+/**
+ * HttpServletRequest를 Map으로 변환
+ * 		예)
+ * 			FoMap params = FoParameterUtil.getParameterMap(request);
+ *
+ * @author fourj1315
+ * @since 2024. 07. 04
+ */
+public class FoParameterUtil {
+	/**
+	 * HttpServletRequest를 Map으로 변환
+	 * 
+	 * @param request - HttpServletRequest
+	 * @return FoMap
+	 * @author fourj1315
+	 * @since 2024. 07. 04
+	 */
+	public static FoMap getParameterMap(HttpServletRequest request) {
+		FoMap map = new FoMap();
+		String key;
+
+		for (Enumeration<?> e = request.getParameterNames(); e.hasMoreElements(); map.put(key, request.getParameter(key)))
+			key = (String)e.nextElement();
+
+		return map;
+	}
+
+	/**
+	 * HttpServletRequest를 Map List로 변환
+	 * 
+	 * @param request - HttpServletRequest
+	 * @return FoMapList
+	 * @author fourj1315
+	 * @since 2024. 07. 04
+	 */
+	public static FoMapList getParameterListMap(HttpServletRequest request) {
+		FoMapList listMap = new FoMapList();
+		String key;
+		List<String> al;
+
+		for (Enumeration<?> e = request.getParameterNames(); e.hasMoreElements(); listMap.put(key, al)) {
+			key = (String)e.nextElement();
+			String values[] = request.getParameterValues(key);
+			al = new ArrayList<String>();
+
+//			for (int i = 0; i < values.length; i++)
+//				al.add(values[i]);
+			for (String value : values)
+				al.add(value);
+		}
+
+		return listMap;
+	}
+}