Package org.apache.torque

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


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

        OIntegerPk oIntegerPk = testData.getOIntegerPkList().get(2);
        oIntegerPk.setName("modified");
        List<NullableOIntegerFk> fkList = new ArrayList<NullableOIntegerFk>();
        fkList.add(testData.getNullableOIntegerFkList().get(1));
View Full Code Here


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

        OIntegerPk oIntegerPk = testData.getOIntegerPkList().get(2);
        List<NullableOIntegerFk> fkList = new ArrayList<NullableOIntegerFk>();
        // object already associated to this object
        fkList.add(testData.getNullableOIntegerFkList().get(1));
View Full Code Here

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

        OIntegerPk oIntegerPk = testData.getOIntegerPkList().get(0);
        List<NonPkOIntegerFk> fkList = new ArrayList<NonPkOIntegerFk>();
        // object already associated to this object
        fkList.add(testData.getNonPkOIntegerFkList().get(1));
View Full Code Here

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

        CompIntegerVarcharPk compIntegerVarcharPk
                = testData.getCompositeIntegerVarcharPkList().get(2);
        List<CompIntegerVarcharFk> fkList
                = new ArrayList<CompIntegerVarcharFk>();
View Full Code Here

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

        OIntegerPk oIntegerPk = testData.getOIntegerPkList().get(0);
        List<CompPkOtherFk> fkList = new ArrayList<CompPkOtherFk>();
        // object already associated to this object
        fkList.add(testData.getCompositePkOtherFkList().get(0));
View Full Code Here

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

        OIntegerPk oIntegerPk = testData.getOIntegerPkList().get(0);
        List<CompPkContainsFk> fkList = new ArrayList<CompPkContainsFk>();
        // object already associated to this object
        fkList.add(testData.getCompositePkContainsFkList().get(0));
View Full Code Here

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

        OIntegerPk oIntegerPk = testData.getOIntegerPkList().get(2);
        List<NullableOIntegerFk> fkList = new ArrayList<NullableOIntegerFk>();
        // copy object already associated to this object
        NullableOIntegerFk alreadyAssociated
View Full Code Here

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

        Criteria criteria = new Criteria();
        criteria.addAscendingOrderByColumn(
                RequiredPIntegerFkPeer.ID);
        List<RequiredPIntegerFk> fkList
View Full Code Here

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

        Criteria criteria = new Criteria();
        criteria.addAscendingOrderByColumn(
                NullableOIntegerFkPeer.ID);
        List<NullableOIntegerFk> fkList
View Full Code Here

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

        Criteria criteria = new Criteria();
        criteria.addAscendingOrderByColumn(
                NonPkOIntegerFkPeer.ID);
        List<NonPkOIntegerFk> fkList
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.