package foundation.dao;
|
|
import foundation.util.Util;
|
|
public class FieldName {
|
|
private String tableName;
|
private String fieldName;
|
private boolean empty;
|
|
public FieldName(String value) {
|
empty = false;
|
parse(value);
|
}
|
|
private void parse(String value) {
|
if (Util.isEmpty(value)) {
|
empty = true;
|
return;
|
}
|
|
int pos = value.indexOf(".");
|
|
if (pos < 0) {
|
fieldName = value;
|
return;
|
}
|
|
tableName = value.substring(0, pos);
|
fieldName = value.substring(pos + 1);
|
}
|
|
public boolean isEmpty() {
|
return empty;
|
}
|
|
public String getTableName() {
|
return tableName;
|
}
|
|
public String getFieldName() {
|
return fieldName;
|
}
|
|
}
|