Package org.apache.torque

Examples of org.apache.torque.ForeignKeySchemaData.save()


    public void testDeleteByPrimaryKeyNoMatch() throws Exception
    {
        ForeignKeySchemaData.clearTablesInDatabase();
        ForeignKeySchemaData testData
                = ForeignKeySchemaData.getDefaultTestData();
        testData.save();

        NullableOIntegerFk toDelete
            = testData.getNullableOIntegerFkList().get(0);
        toDelete.setId(toDelete.getId() - 1);
        int preDeleteId = toDelete.getId();
View Full Code Here


    public void testDeleteByCriteria() throws Exception
    {
        ForeignKeySchemaData.clearTablesInDatabase();
        ForeignKeySchemaData testData
                = ForeignKeySchemaData.getDefaultTestData();
        testData.save();

        // call delete method
        Criteria criteria = new Criteria();
        criteria.and(
                NullableOIntegerFkPeer.ID,
View Full Code Here

    public void testDeleteByCriteriaNoMatch() throws Exception
    {
        ForeignKeySchemaData.clearTablesInDatabase();
        ForeignKeySchemaData testData
                = ForeignKeySchemaData.getDefaultTestData();
        testData.save();

        // call delete method
        Criteria criteria = new Criteria();
        criteria.and(NullableOIntegerFkPeer.NAME, "noMatch");
        int deletedCount = NullableOIntegerFkPeer.doDelete(criteria);
View Full Code Here

    public void testDeleteWithOtherTableColumn() throws Exception
    {
        ForeignKeySchemaData.clearTablesInDatabase();
        ForeignKeySchemaData testData
                = ForeignKeySchemaData.getDefaultTestData();
        testData.save();

        // call delete method
        Criteria criteria = new Criteria();
        criteria.and(
                OIntegerPkPeer.ID,
View Full Code Here

    public void testDeleteByCriteriaWithJoins() throws Exception
    {
        ForeignKeySchemaData.clearTablesInDatabase();
        ForeignKeySchemaData testData
                = ForeignKeySchemaData.getDefaultTestData();
        testData.save();

        // call delete method
        Criteria criteria = new Criteria();
        criteria.addJoin(
                NullableOIntegerFkPeer.FK,
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.