use of com.vaticle.typedb.core.concept.thing.Entity in project grakn by graknlabs.
the class EntitySteps method entity_type_create_new_instance_with_key.
@When("{var} = entity\\( ?{type_label} ?) create new instance with key\\( ?{type_label} ?): {int}")
public void entity_type_create_new_instance_with_key(String var, String type, String keyType, int keyValue) {
Attribute.Long key = tx().concepts().getAttributeType(keyType).asLong().put(keyValue);
Entity entity = tx().concepts().getEntityType(type).create();
entity.setHas(key);
put(var, entity);
}
use of com.vaticle.typedb.core.concept.thing.Entity in project grakn by graknlabs.
the class EntitySteps method entity_type_create_new_instance_with_key.
@When("{var} = entity\\( ?{type_label} ?) create new instance with key\\( ?{type_label} ?): {datetime}")
public void entity_type_create_new_instance_with_key(String var, String type, String keyType, LocalDateTime keyValue) {
Attribute.DateTime key = tx().concepts().getAttributeType(keyType).asDateTime().put(keyValue);
Entity entity = tx().concepts().getEntityType(type).create();
entity.setHas(key);
put(var, entity);
}
Aggregations