Examples of WrongPrimaryKeyException


Examples of org.datanucleus.store.rdbms.exceptions.WrongPrimaryKeyException

        PrimaryKey expectedPK = getPrimaryKey();
        if (expectedPK.size() == 0)
        {
            if (!actualPKs.isEmpty())
            {
                throw new WrongPrimaryKeyException(this.toString(), expectedPK.toString(), StringUtils.collectionToString(actualPKs.values()));
            }
        }
        else
        {
            if (actualPKs.size() != 1 ||
                !actualPKs.values().contains(expectedPK))
            {
                throw new WrongPrimaryKeyException(this.toString(), expectedPK.toString(), StringUtils.collectionToString(actualPKs.values()));
            }
        }

        return true;
    }
View Full Code Here

Examples of org.jpox.store.rdbms.exceptions.WrongPrimaryKeyException

        PrimaryKey expectedPK = getPrimaryKey();
        if (expectedPK.size() == 0)
        {
            if (!actualPKs.isEmpty())
            {
                throw new WrongPrimaryKeyException(this.toString(), expectedPK.toString(), StringUtils.collectionToString(actualPKs.values()));
            }
        }
        else
        {
            if (actualPKs.size() != 1 ||
                !actualPKs.values().contains(expectedPK))
            {
                throw new WrongPrimaryKeyException(this.toString(), expectedPK.toString(), StringUtils.collectionToString(actualPKs.values()));
            }
        }

        return true;
    }
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.