Search in sources :

Example 1 with OPropertyNamingModel

use of ru.ydn.wicket.wicketorientdb.model.OPropertyNamingModel in project wicket-orientdb by OrienteerBAP.

the class TestModels method testOPropertyNamingModel.

@Test
public void testOPropertyNamingModel() {
    IModel<String> classNameModel = Model.of("OUser");
    IModel<OClass> oClassModel = new OClassModel(classNameModel);
    IModel<OProperty> propertyModel = new OPropertyModel(oClassModel, "name");
    OPropertyNamingModel model = new OPropertyNamingModel(propertyModel);
    assertModelObjectEquals("Name", model);
    model.detach();
    classNameModel.setObject("ORole");
    assertModelObjectEquals("Role Name", model);
}
Also used : OPropertyNamingModel(ru.ydn.wicket.wicketorientdb.model.OPropertyNamingModel) OProperty(com.orientechnologies.orient.core.metadata.schema.OProperty) OClassModel(ru.ydn.wicket.wicketorientdb.model.OClassModel) OClass(com.orientechnologies.orient.core.metadata.schema.OClass) OPropertyModel(ru.ydn.wicket.wicketorientdb.model.OPropertyModel) Test(org.junit.Test)

Aggregations

OClass (com.orientechnologies.orient.core.metadata.schema.OClass)1 OProperty (com.orientechnologies.orient.core.metadata.schema.OProperty)1 Test (org.junit.Test)1 OClassModel (ru.ydn.wicket.wicketorientdb.model.OClassModel)1 OPropertyModel (ru.ydn.wicket.wicketorientdb.model.OPropertyModel)1 OPropertyNamingModel (ru.ydn.wicket.wicketorientdb.model.OPropertyNamingModel)1