Package org.apache.art

Examples of org.apache.art.EnumEntity


public class EnumTest extends CayenneCase {

    public void testInsert() {
        ObjectContext context = createDataContext();

        EnumEntity e = context.newObject(EnumEntity.class);
        e.setEnumAttribute(Enum1.one);

        context.commitChanges();
    }
View Full Code Here


        SelectQuery q = new SelectQuery(EnumEntity.class);
        q.andQualifier(ExpressionFactory.matchExp(
                EnumEntity.ENUM_ATTRIBUTE_PROPERTY,
                Enum1.one));

        EnumEntity e = (EnumEntity) DataObjectUtils.objectForQuery(context, q);
        assertNotNull(e);
        assertSame(Enum1.one, e.getEnumAttribute());
    }
View Full Code Here

        SQLTemplate q = new SQLTemplate(
                EnumEntity.class,
                "SELECT * FROM ENUM_ENTITY WHERE ENUM_ATTRIBUTE = 'one'");
        q.setColumnNamesCapitalization(CapsStrategy.UPPER);

        EnumEntity e = (EnumEntity) DataObjectUtils.objectForQuery(context, q);
        assertNotNull(e);
        assertSame(Enum1.one, e.getEnumAttribute());
    }
View Full Code Here

TOP

Related Classes of org.apache.art.EnumEntity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.