Search in sources :

Example 81 with ObjAttribute

use of org.apache.cayenne.map.ObjAttribute in project cayenne by apache.

the class EOModelProcessorTest method assertLoadedCustomTypes.

protected void assertLoadedCustomTypes(DataMap map) throws Exception {
    // check obj entities
    ObjEntity customTypes = map.getObjEntity("CustomTypes");
    assertNotNull(customTypes);
    ObjAttribute pk = customTypes.getAttribute("pk");
    assertNotNull(pk);
    assertEquals("CustomType1", pk.getType());
    ObjAttribute other = customTypes.getAttribute("other");
    assertNotNull(other);
    assertEquals("CustomType2", other.getType());
}
Also used : ObjEntity(org.apache.cayenne.map.ObjEntity) ObjAttribute(org.apache.cayenne.map.ObjAttribute)

Aggregations

ObjAttribute (org.apache.cayenne.map.ObjAttribute)81 ObjEntity (org.apache.cayenne.map.ObjEntity)57 DbAttribute (org.apache.cayenne.map.DbAttribute)31 ObjRelationship (org.apache.cayenne.map.ObjRelationship)27 DbEntity (org.apache.cayenne.map.DbEntity)26 Test (org.junit.Test)26 DbRelationship (org.apache.cayenne.map.DbRelationship)19 DbJoin (org.apache.cayenne.map.DbJoin)12 DataMap (org.apache.cayenne.map.DataMap)9 ClassDescriptor (org.apache.cayenne.reflect.ClassDescriptor)9 HashMap (java.util.HashMap)8 CayenneRuntimeException (org.apache.cayenne.CayenneRuntimeException)8 AttributeProperty (org.apache.cayenne.reflect.AttributeProperty)8 PropertyVisitor (org.apache.cayenne.reflect.PropertyVisitor)8 ToManyProperty (org.apache.cayenne.reflect.ToManyProperty)8 ToOneProperty (org.apache.cayenne.reflect.ToOneProperty)8 ArrayList (java.util.ArrayList)7 DataChannelDescriptor (org.apache.cayenne.configuration.DataChannelDescriptor)7 HashSet (java.util.HashSet)6 Expression (org.apache.cayenne.exp.Expression)6