use of com.haulmont.cuba.core.app.keyvalue.KeyValueMetaClass in project cuba by cuba-platform.
the class ValueDatasourceDelegate method addProperty.
public void addProperty(String name, Datatype datatype) {
checkNotNullArgument(name, "name is null");
checkNotNullArgument(datatype, "type is null");
((KeyValueMetaClass) ds.metaClass).addProperty(new KeyValueMetaProperty(ds.metaClass, name, datatype));
}
use of com.haulmont.cuba.core.app.keyvalue.KeyValueMetaClass in project cuba by cuba-platform.
the class ValueDatasourceDelegate method addProperty.
public void addProperty(String name) {
checkNotNullArgument(name, "name is null");
((KeyValueMetaClass) ds.metaClass).addProperty(new KeyValueMetaProperty(ds.metaClass, name, String.class));
}
use of com.haulmont.cuba.core.app.keyvalue.KeyValueMetaClass in project cuba by cuba-platform.
the class ValueGroupDatasourceImpl method setup.
@Override
public void setup(DsContext dsContext, DataSupplier dataSupplier, String id, MetaClass metaClass, @Nullable View view) {
this.id = id;
this.dsContext = dsContext;
this.dataSupplier = dataSupplier;
this.metaClass = new KeyValueMetaClass();
}
use of com.haulmont.cuba.core.app.keyvalue.KeyValueMetaClass in project cuba by cuba-platform.
the class ValueHierarchicalDatasourceImpl method setup.
@Override
public void setup(DsContext dsContext, DataSupplier dataSupplier, String id, MetaClass metaClass, @Nullable View view) {
this.id = id;
this.dsContext = dsContext;
this.dataSupplier = dataSupplier;
this.metaClass = new KeyValueMetaClass();
}
use of com.haulmont.cuba.core.app.keyvalue.KeyValueMetaClass in project cuba by cuba-platform.
the class ValueHierarchicalDatasourceImpl method setHierarchyPropertyName.
@Override
public void setHierarchyPropertyName(String hierarchyPropertyName) {
super.setHierarchyPropertyName(hierarchyPropertyName);
KeyValueMetaClass metaClass = (KeyValueMetaClass) this.metaClass;
if (metaClass.getProperty(hierarchyPropertyName) == null) {
throw new IllegalStateException("Hierarchy property must be added to the datasource as property first");
}
}
Aggregations