summaryrefslogtreecommitdiff
path: root/src/main/java/com/redstoner/misc/mysql/elements/MysqlField.java
blob: 61cba2ec1e649cc5081ced17637ea1e198a87276 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package com.redstoner.misc.mysql.elements;

import com.redstoner.misc.mysql.types.MysqlType;

public class MysqlField {
	private String name;
	private MysqlType type;
	private boolean canBeNull;
	
	public MysqlField(String name, MysqlType type, boolean canBeNull) {
		this.name = name;
		this.type = type;
		this.canBeNull = canBeNull;
	}
	
	public MysqlField(String name, String type, boolean canBeNull) {
		this.name = name;
		this.type = MysqlType.getTypeFromString(type);
		this.canBeNull = canBeNull;
	}
	
	public String getName() {
		return name;
	}
	
	public MysqlType getType() {
		return type;
	}
	
	public boolean canBeNull() {
		return canBeNull;
	}
}