package foundation.dao;
|
|
import foundation.data.entity.Entity;
|
import foundation.data.entity.EntitySet;
|
|
public class DataCell {
|
|
private Object value;
|
|
public void load(Object value) {
|
this.value = value;
|
}
|
|
public Object getValue() {
|
return value;
|
}
|
|
public Entity getEntity() {
|
if (value == null) {
|
return null;
|
}
|
|
return (Entity)value;
|
}
|
|
public EntitySet getEntitySet() {
|
if (value == null) {
|
return null;
|
}
|
|
return (EntitySet)value;
|
}
|
|
public Boolean isEntitySet() {
|
if (value == null) {
|
return null;
|
}
|
|
return value instanceof EntitySet;
|
}
|
|
public Boolean isEntity() {
|
if (value == null) {
|
return null;
|
}
|
|
return value instanceof Entity;
|
}
|
|
public boolean isEmpty() {
|
if (value == null) {
|
return true;
|
}
|
|
if (value instanceof Entity) {
|
return ((Entity)value).isEmpty();
|
}
|
else if (value instanceof EntitySet) {
|
return ((EntitySet)value).isEmpty();
|
}
|
|
return true;
|
}
|
|
}
|